The MIDL compiler and the MkTypLib utility build type libraries. These tools are described in Chapter 8, "Type Libraries and the Object Description Language."
Run the MIDL compiler or MkTypLib tool on the script. For example:
MIDL /TLB output.tlb /H output.h inscript.odl
or
MKTYPLIB /TLB output.tlb /H output.h inscript.odl
Based on the object description script inscript.odl
, the example creates a type library named output.tlb
and a header file named output.h
.
After creating the type library, you can include it in the resource step of building your application, or leave it as a stand-alone file. In either case, be sure to specify the file name and path of the library in the application's registration (.reg) file, so Automation can find the type library when necessary. See the following section for information on registering the type library.
output.tlb
with a DLL, use the following statement in the .rc file for the DLL:1 typelib output.tlb
A DLL that contains a type library resource usually has the .olb (object library) extension.