I think what he's thinking (I've done this myself) is to create a C# assembly that has all the proper GUID's, DISPID's, interfaces, etc... so that once compiled and registered with regasm.exe, it will look just like the old COM object. It gives you the ability to replace a COM object with a .NET object without having to recompile the COM client.
At least I think that's what he's after -- I could be wrong. I've done this before, but it was for a client and thus I can't give you the source code. My approach was to use the TlbInf32 COM object to inspect the type library and generate the C# source code. -- Patrick Steele http://weblogs.asp.net/psteele -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of J. Merrill Sent: Wednesday, March 21, 2007 12:26 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] TypeLibrary to Source Why do you need source? Doesn't .Net's command-line program tlbimp.exe (that builds an actual interop assembly) do what you need? If it doesn't, you could always use Reflector to take the resulting assembly and get back to source from that. At 02:10 PM 3/20/2007, Wilson, Phil wrote >Is anyone aware of a tool that takes a type library and builds C# >source for the interop assembly? I know of Aurigma's ComToNet (now >free), but I'm hoping to find source for the tool also. > >Thanks > >Phil Wilson J. Merrill / Analytical Software Corp =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
