Deploying Type Libraries
Go Up to Working with Type Libraries Index
By default, when you have a type library that was created as part of an Automation server project, the type library is automatically linked into the .DLL, .OCX, or EXE as a resource.
You can, however, deploy your application with the type library as a separate .TLB, as Delphi maintains the type library, if you prefer.
Historically, type libraries for Automation applications were stored as a separate file with the .TLB extension. Now, typical Automation applications compile the type libraries into the .OCX or .EXE file directly. The operating system expects the type library to be the first resource in the executable (.DLL, .OCX, or .EXE) file.
When you make type libraries other than the primary project type library available to application developers, the type libraries can be in any of the following forms:
- Stand-alone binary files. The .TLB file output by the Type Library editor is a binary file.
- A resource. This resource should have the type TYPELIB and an integer ID. If you choose to build type libraries with a resource compiler, it must be declared in the resource (.RC) file as follows:
1 typelib mylib1.tlb 2 typelib mylib2.tlb