Title: tlbimp task

Hello all,

I would like to see an addition for the tlbimp task:
In a Visual Studio .NET, the project file only states the clsid and version number of the dll you want to Interop. As the specific dll on the build box does not have to be in the same place as on the developer's box, it would be nice to have the tlbimp task do a lookup of the dll location via the clsid...

Example:

using System;
using Microsoft.Win32;

namespace DynamicLinkLibraryLocator {
  class Class1 {
    // CLSID like: {783CD4E4-9D54-11CF-B8EE-00608CC9A71F}
    string GetDLLLocation(string CLSID) {
    RegistryKey CLSIDKey = Registry.ClassesRoot.OpenSubKey("CLSID");
    RegistryKey ClassKey = CLSIDKey.OpenSubKey(CLSID);
    RegistryKey InprocServer32Key = ClassKey.OpenSubKey("InprocServer32");
    return (string) InprocServer32Key.GetValue("");
  }
}

Greetings, Twan Jacobs



Disclaimer http://www.infosupport.com
***********************************************************************
This E-Mail Message is intended exclusively for the addressee. If the
E-Mail was sent to you in error, please notify the sender immediately
by replying to this E-mail. We would then request you to destroy the
E-Mail and neither to use nor disclose the contents in any manner to
third parties, as the message could contain confidential information
which may be protected by the professional secrecy act.

This footnote also confirms that this E-mail message has been swept for
computer viruses.
***********************************************************************

Reply via email to