Partager via


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)

  1. 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
    
  2. At the command prompt, type the following command to produce MSIL for the assembly:

    ildasm New.dll /out:new.il
    
  3. Edit the MSIL as required.

  4. At the command prompt, type the following command to produce a new New.dll defining the proper syntax:

    ilasm New.il /dll 
    

See Also

Reference

Type Library Importer (Tlbimp.exe)
MSIL Disassembler (Ildasm.exe)
MSIL Assembler (Ilasm.exe)

Concepts

Marshaling Changes
Customizing Runtime Callable Wrappers