Is there any open source tool for automatically generating .NET wrappers for a COM DLL library?
Thank you.
Is there any open source tool for automatically generating .NET wrappers for a COM DLL library?
Thank you.
You can try to use SWIG which is able to generate wrapper code for 18 languages. Also this MSDN article might be useful.
There is no wrapper necessary to use a COM object in .NET. In Visual Studio, right-click your project name in the Solution Explorer, and select "Add Reference." Any registered COM objects will be listed in the COM tab.
Interop wrappers are only necessary when using .NET assemblies as if they were COM objects - not the other way around as you have described in your question.
You can use the command line tool for the Type library import tool it will generate an interop assembly for you to use in your project.
The Type Library Importer converts the type definitions found within a COM type library into equivalent definitions in a common language runtime assembly.
If you are using VS.net you will be able to do this through the IDE. Otherwise I believe this tool is freely available (per your open-source request).
Yes, the source code for Tlbimp.exe is available. Download it from here...