Converting COM dll to Interop Assembly  
Author Message
PPM





PostPosted: Visual C# Language, Converting COM dll to Interop Assembly Top

I am trying to create an Interop Assembly from a dll in my code using

ConvertTypeLibToAssembly following the directions given in the MSDN site.

This creates the Interop assebmlies. When I check the assemblies in the "ILDASM.exe" some of the assemblies do not show the methods they contain. (this happes for only some of the dlls.)

I try to create assembly for the same dll using tlbimp.exe and when opened in ILDASM.exe I can see the methods.

Can somebody help me on this.

 




Visual C#11  
 
 
James Kovacs





PostPosted: Visual C# Language, Converting COM dll to Interop Assembly Top

Is there any rhyme or reason to which COM DLLs produce working assemblies and which don't When "some assemblies do not show the methods they contain", do they show no methods or just some, but not all, methods
 
I know it's not helpful, but the MSDN docs, which you've probably already read, claim that tlbimp.exe and TypeLibConverter produce the same metadata. From http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconimportingtypelibraryasassembly.asp:

TypeLibConverter Class

The TypeLibConverter class (in the System.Runtime.InteropServices namespace) provides methods to convert coclasses and interfaces in a type library to metadata within an assembly. This API produces the same metadata output as Tlbimp.exe. However, unlike Tlbimp.exe, the TypeLibConverter class can convert an in-memory type library to metadata.



 
 
MegasAlexandros





PostPosted: Visual C# Language, Converting COM dll to Interop Assembly Top

I have a serious situation where i use an interop assembly (made via console and/or VS05 during tests).
My properties in the VB6 dll have been renamed and my signatures changed!

Can't manage to talk to the dll.

Is there someway to have a better control over this process