Type Library (C++)

From RAD Studio
Jump to: navigation, search

Go Up to C++ Options


Tools > Options > Language > C++ Options > Type Library

Use the Type Library page to select options for the Type Library editor.

Item Description

Ignore special CoClass Flags when importing

When you import an ActiveX Control, the type library importer only imports CoClasses that are not marked as Hidden, Restricted, or Predefined, and marked as CanCreate. These flags are supposed to be set if the object is intended for general use. However, if you want to create a control for an internal application only, you can override the flags to generate the CoClass wrappers. In this case, you would check Ignore special CoClass flags when importing, Hidden, Restricted, and uncheck CanCreate.

Check the CoClass flags you want to ignore when importing ActiveX controls:

  • Predefined: Client applications should automatically create a single instance of this object.
  • Restricted: A CoClass marked restricted is supposed to be ignored by tools that access COM objects. It is exposed by the type library but restricted to those authorized to use it.
  • Hidden: The interface exists but should not be displayed in a user-oriented browser.
  • Can Create: The instance can be created with CoCreateInstance.

Use dispinterfaces in control wrappers

If the component supports both vtable and IDispatch-based interfaces, checking this option causes the importer to make the dispinterface the default interface for the component. The default behavior is to make the vtable-based interface the default interface.

MS-style property getter/setter prefixes

If this option is checked, the importer uses Microsoft Visual C++ style prefixes on property getter and setter methods. Otherwise, the default prefixes get_ and set_ are used.

Change suffix

The type library importer appends the suffix _OCX to the component wrapper files it generates. You can change this behavior by clicking Change suffix and typing a new suffix in the text field.

Lookup referred type libraries in the registry

An importlib statement in a RIDL file does not specify the full path of a type library. When this checkbox is checked, the Type Library Editor looks up files in the registry of type libraries on the system. You can view the list of registered type libraries by using the Show All Type Libraries command on the Design pane of the Type Library Editor.

Store Unicode data as UTF8 in type library

When you use Unicode identifiers, you must enable saving of data as UTF8. Also note that you can use Unicode identifiers only with Delphi and C++ clients and servers (that is, clients and servers that are not products of Embarcadero might not assume that identifiers are UTF8 encoded).

Check for UTF8 data in type library

This option enables the decoding of UTF8 data in the type library. If the previous option (Store Unicode data as UTF8) is checked, make sure that this option is also checked.

Refresh implementation when renaming type library

Refreshes the type library implementation when you rename the type library, as if you had clicked the Refresh Implementation button on the Type Library Editor.

Refresh implementation when .ridl file is saved

Refreshes the type library implementation each time you save the RIDL file, as if you had clicked the Refresh Implementation button on the Type Library Editor.

See Also