Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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 
    

Community Additions

ADD
Show:
© 2015 Microsoft