How to: Edit Interop Assemblies
The Type Library Importer (Tlbimp.exe) converts most COM method signatures into managed signatures. However, several types require additional information that you can specify by editing the interop assembly. This topic describes how to edit an interop assembly. The Marshaling Changes topic identifies several cases that require you to edit the interop assembly and describes the changes needed.
To specify marshaling changes in Microsoft intermediate language (MSIL)
Generate the initial interop assembly using Tlbimp.exe. For example, to produce an assembly called New.dll from New.tlb, type the following command at the command prompt:
tlbimp New.tlb /out:New.dll
At the command prompt, type the following command to produce MSIL for the assembly:
ildasm New.dll /out:new.il
Edit the MSIL as required.
At the command prompt, type the following command to produce a new New.dll defining the proper syntax:
ilasm New.il /dll