Discover COM details : TLBIMP.exe like functionality.

  • Thread starter Thread starter Kaleem M. A.
  • Start date Start date
K

Kaleem M. A.

Hi All,

I have to mimic the Type Library importer (TLBIMP.exe) functionality.
Is there no other way than to convert the COM to a Assembly using
InteropServices.TypeLibConverter class.

Is this the only way. ?

What will be the "most correct" way to do this. ?


--
Thanks in advance.
Kaleem.

Infospectrum India Pvt. Ltd.
Nagpur India
email : (e-mail address removed)
phone : 91-712-2273711
91-712-2273712
 
I have to mimic the Type Library importer (TLBIMP.exe) functionality.
Is there no other way than to convert the COM to a Assembly using
InteropServices.TypeLibConverter class.

Is this the only way. ?

That, or to implement the entire conversion process yourself (lots of
work). Any reason you don't want to use TypeLibConverter?



Mattias
 
Thanks Mattias,

I need to find out the methods and properties of a COM object.
This is what I am doing.
The COM gets converted to an Assembly and I save the converted Assembly.
Then loaded Assembly.
Using Type.GetType and GetMembers I get am able to get all the details of
the COM.

But I haven't figured out exactly how can this be achieved with out saving
the converted assembly.

Is there any other way apart from saving the assembly.?

Thanks,
Kaleem
 
Kaleem,
Is there any other way apart from saving the assembly.?

Unfortunately the TypeLibConverter doesn't have an option to not save
the assmembly, but you should be able to just delete it when you're
done.

The AssemblyBuilder returned by ConvertTypeLibToAssembly can be used
directly for reflection, so you don't have to explicitly load the
assembly that was created.



Mattias
 
Back
Top