Saving a Type Library

From RAD Studio
Jump to: navigation, search

Go Up to Using the Type Library Editor

For 2009, RAD Studio stores type libraries as separate text-based files (RIDL, or Restricted Interface Definition Language); the RIDL file, which represents the TLB file in the Editor, is also linked into the server (.EXE, DLL, or .OCX). When you build your project, the RIDL file is saved on disk as both a .tlb file and a .ridl file.

There are three ways to save a type library:

  • File>Save Command: To save the project and the type library, choose File > Save. Saving a type library saves type information to a .ridl file.
  • Save TLB Button in Type Library Editor: To save the type library as a .tlb file, click Save as TLB in the Toolbar of the Type Library Editor. Saving as a TLB creates a binary type library file (.tlb extension) derived from the .ridl file in your type library.
  • Build Your Project or Run GenTLB: Both building your project and running GenTLB.exe saves the type library as a .tlb file.

You might encounter unexpected messages from COM, when you save a type library as a TLB file (such as when you perform a project build). No syntax or validity checks are performed while you are working with the .ridl file, or when you only save the project.

See Also