Working with Type Libraries

A type library is a collection of information about data types, OLE interfaces, member functions, object classes, properties, methods, and parameters. You can generate a type library, optional type library source file, and registration file for a module.

You can set various options that control how type libraries get generated. For example, you can specify that a type library is automatically generated each time you register (add) a new module to the local workstation.

Note: To set options for type libraries, use the OLE Automation options window (Tools->Options on the menu bar, OLE Automation tab). For information on setting these options, refer to Figure 3-8 and the accompanying explanation in Table 3-4.

Generating a Type Library

To generate a type library on a module:

  1. In the Workstation Objects window, select a module.

  2. Choose Tools->Generate Type Library from the menu bar

    Or

    Choose Generate Type Library from the popup menu on the module (right mouse click to get popup menu).

    (Keyboard shortcuts to generate a type library on a module are Alt T G or Ctrl G.)

    This causes a type library (and, if specified in options, type library source) to be generated for the selected module. The type library is saved in the default location showing for the OLE Automation type library options.

Removing a Type Library

You can quickly remove the type library for a module along with the type library source file (if it exists) and the registration file.

To remove a type library (and related files) for a module:

  1. In the Workstation Objects window, select a module.

  2. Choose Tools->Remove Type Library from the menu bar

    Or

    Choose Remove Type Library from the popup menu on the module (right mouse click to get popup menu).

    (The keyboard shortcut to remove a type library on a module is Alt T R.)

    This removes the type library, registration file, and (if it exists) type library source for the selected module.