GenTLB.exe

From RAD Studio
Jump to: navigation, search

Go Up to Command-Line Utilities Index


GenTLB.exe is the type library generator. When you compile or build a project that contains a type library, the type library generator compiles the text-based RIDL (Restricted Interface Definition Language) file into the binary .tlb file.

When the current target platform is 64-bit Windows, the IDE now passes "-E64" to GenTLB.exe. The result is a type library whose SYSKIND is SYS_WIN64 (compared to SYSKIND=SYS_WIN32 for a 32-bit type library). For more information, see TLIBIMP.EXE.

You can use GenTLB.exe in your custom builds. If you use MSBuild from the command line, then MSBuild automatically uses GenTLB.exe.

Command-Line Syntax

GENTLB [<options>] <sourcefile>


Command-Line Elements

Element Description

<options>

Command-line options. Optional.

<sourcefile>

The text-based RIDL file describing the type library to be generated.


To display the command-line help for GENTLB, enter:

gentlb

or

gentlb -?


Command-Line Options

GenTLB.EXE supports the command-line options listed in the following table:

GenTLB Command Line Options

Option Description

-T<name>

Sets the name <name> of the type library file to be generated.

-D<path>

Sets the output directory path <path>.

-C

Sets to generate the C++ language binding file.

-P

Sets to generate the Delphi language binding file.


Examples

Example 1

To create AppName.tlb from the contents of AppName.ridl:

gentlb  AppName.ridl

Example 2

To create a type library based on a differently named .ridl file, use the -T option to specify the name of the type library. To create AppName.tlb from the contents of model.ridl:

gentlb -TAppName.tlb  model.ridl

See Also