zoukankan      html  css  js  c++  java
  • Type Library Exporter (Tlbexp.exe)

    Type Library Exporter (Tlbexp.exe)

    The Type Library Exporter generates a type library that describes the types defined in a common language runtime assembly.

    tlbexp assemblyName [/out:file] [/nologo] [/silent] [/verbose]
    Argument Description
    assemblyName The assembly for which to export a type library.
    Option Description
    /help Displays command syntax and options for the tool.
    /names:filename Specifies the capitalization of names in a type library. The filename argument is a text file. Each line in the file specifies the capitalization of one name in the type library.
    /nologo Suppresses the Microsoft startup banner display.
    /out:file Specifies the name of the type library file to generate. If you omit this option, Tlbexp.exe generates a type library with the same name as the assembly (the actual assembly name, which might not necessarily be the same as the file containing the assembly) and a .tlb extension.
    /silent Suppresses the display of success messages.
    /verbose Specifies verbose mode; displays a list of any referenced assemblies for which a type library needs to be generated.
    /? Displays command syntax and options for the tool.
    Note   The command-line options for Tlbexp.exe are case-insensitive and can be supplied in any order. You only need to specify enough of the option to uniquely identify it. For example, /n is equivalent to /nologo, and /o:outfile.tlb is equivalent to /out:outfile.tlb.

    Remarks

    Tlbexp.exe generates a type library that contains definitions of the types defined in the assembly. Applications such as Visual Basic 6.0 can use the generated type library to bind to the .NET types defined in the assembly.

    The entire assembly is converted at once. You cannot use Tlbexp.exe to generate type information for a subset of the types defined in an assembly.

    You cannot use Tlbexp.exe to produce a type library from an assembly that was imported using the Type Library Importer (Tlbimp.exe). Instead, you should refer to the original type library that was imported with Tlbimp.exe. You can export a type library from an assembly that references assemblies that were imported using Tlbimp.exe. See the examples section below.

    Tlbexp.exe places generated type libraries in the current working directory or the directory specified for the output file. A single assembly might cause several type libraries to be generated.

    Tlbexp.exe generates a type library but does not register it. This is in contrast to the Assembly Registration tool (Regasm.exe), which both generates and registers a type library. To generate and register a type library with COM, use Regasm.exe.

    Because type libraries cannot accommodate all the information found in assemblies, Tlbexp.exe might discard some data during the export process. For an explanation of the transformation process and identification of the source of each piece of information emitted to a type library, see the Assembly to Type Library Conversion Summary.

    Examples

    The following command generates a type library with the same name as the assembly found in myTest.dll.

    tlbexp myTest.dll

    The following command generates a type library with the name clipper.tlb.

    tlbexp myTest.dll /out:clipper.tlb

    The following example illustrates using Tlbexp.exe to export a type library from an assembly that references assemblies that were imported using Tlbimp.exe.

    First use Tlbimp.exe to import the type library myLib.tlb and save it as myLib.dll.

    tlbimp myLib.tlb /out:myLib.dll

    The following command uses the C# compiler to compile the Sample.dll, which references myLib.dll created in the previous example.

    CSC Sample.cs /reference:myLib.dll /out:Sample.dll

    The following command generates a type library for Sample.dll that references myLib.dll.

    tlbexp Sample.dll
  • 相关阅读:
    PHP如何判断一个gif图片是否为动画?
    Linux常用系统管理命令(top、free、kill、df)
    Mysql字符串连接函数 CONCAT()与 CONCAT_WS()
    OSChina.net 的 Tomcat 配置 server.xml 参考
    修改Linux默认启动级别或模式
    更改CentOS 6.3 yum源为国内 阿里云源
    PHP session过期机制和配置
    PHP垃圾回收机制防止内存溢出
    memcache与memcached的区别
    【总结】虚拟机VirtualBox各种使用技巧
  • 原文地址:https://www.cnblogs.com/MayGarden/p/1634531.html
Copyright © 2011-2022 走看看