Creating a New Type Library

From RAD Studio
Jump to: navigation, search

Go Up to Using the Type Library Editor

Use the Type Library Wizard to create a type library that is independent of a particular COM object. For example, you might want to define a type library that contains type definitions that you use in several other type libraries. You can then create a type library of basic definitions and add it to the uses page of other type libraries.

You can also use the wizard to create a type library for an object that is not yet implemented. Once the type library contains the interface definition, you can use the COM object wizard to generate a CoClass and implementation.

To create a new type library

  1. If you have a project open, click File > Close All.
  2. Choose File > New > Other to open the New Items dialog box.
  3. Choose the ActiveX folder under either Delphi Projects or C++Builder Projects.
  4. Select the Type Library icon in the right pane.
  5. Choose OK. The wizard creates an empty RIDL file and opens it in the Design page of the Type Library Editor (in the Code Editor window).
  6. Enter a name for the type library in the Name field.
  7. Continue by adding elements to your type library by using the toolbar buttons.

See Also