4

How can I parse an unmanaged code in TLB (Of unmanaged COM server) in C#?

VividD
  • 10,456
  • 6
  • 64
  • 111
Usman
  • 2,742
  • 4
  • 44
  • 82
  • Do you want to do this to inspect type libraries in general, or do you want to access the unmanaged COM server via the type library information? – Kim Gräsman May 06 '10 at 19:10

2 Answers2

3

By creating a managed wrapper using tlbimp.exe.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • I need to write a wrapper code in C# for extracting all types contained inside type library(unmanaged COM server's TLB) – Usman May 06 '10 at 06:22
  • No, the `tlbimp.exe` utility will generate a managed assembly from the TLB which will contain all the types that are exposed. – Darin Dimitrov May 06 '10 at 06:26
  • Then how can I be able to write such code in C# to extract all types,interfaces,exposed functions with complete signatures of that COM server whose TLB is UNMANAGED? – Usman May 06 '10 at 06:30
2

Once I wrote a TLB browser in VB. I used a COM component that shipped with VB 6 called TlbInf32.dll (you can still find this component in the web I guess).

Best

Vagaus
  • 4,174
  • 20
  • 31