Sunday, July 22, 2007

Interop: Convert COM Library to Metdata, tlbimp.exe

Generate Interop Assemblies from type Libraries: Tlbimp.exe

• Tlbimp.exe is a command-line tool that converts the coclasses and interfaces contained in a COM type library to metadata
• This tool creates an interop assembly and namespace for the type information automatically
• Once the metadata is available, managed clients can create instances of COM type and call its methods just as if they were a .net instance
• Syntax of Type Library Importer or Tlbimp.exe
tlbimp
Example: tlbimp somedllfile.dll /out: renamed.dll

No comments: