RAD Studio (Common)
ContentsIndex
PreviousUpNext
Type Library Editor

ViewType Library 

Makes changes to your type library. The Type Library editor generates the required IDL syntax automatically. Any changes you make in the editor are reflected in the corresponding implementation class (if it was created using a wizard). 

The ViewType Library command is available only for projects that contain a type library. The wizards on the ActiveX page automatically add a type library to the project when they create a COM object.

Each instance of an information type in the current type library appears in the object list, represented by a unique icon. Select an icon to see its data pages displayed in the information pane at the right.

Lists the type information associated with the object currently selected in the object list pane. You can use the controls to edit these values. What attributes appear depends on the selected element.

Item 
Description 
Name  
A descriptive name for the type library. The name can’t include spaces or punctuation.  
GUID  
The globally unique 128-bit identifier of the type library’s interface (a descendant of ITypeLib).  
Version  
A particular version of the library in cases where multiple versions of the library exist. The version is either a pair of decimal integers separated by a period, or a single decimal integer. The first of the two integers represents the major version number, and the second represents the minor version number. If a single integer is used, it represents the major version number. Both major and minor version numbers are short unsigned integers in the range between 0 and 65535, inclusive  
LCID  
The locale identifier that describes the single national language used for all text strings in the type library and its elements.  
Help String  
A short description of the type library. Used with Help Context to provide Help as a Help file. This string is mapped to the Help Context when creating the help file.  
Help Context  
The Help context ID of for the type library’s main help. This ID identifies the Help topic within the Help file.  
Help String Context  
For help DLLs, the Help context ID of the type library’s main help. Used with Help String DLL to provide Help as a separate DLL.  
Help String DLL  
The fully-qualified name of the DLL used for help, if any.  
Help File  
The name of the help file (.hlp) associated with the type library, if any.  

Note: The Type Library editor supports two mechanisms for supplying help. The traditional help mechanism, where a standard windows help file has been created for the library, or where the help information is located in a separate DLL (for localization purposes). You must supply the help file to which the Help attributes apply.

Contains the declarations for the currently selected element in IDL or Object Pascal. You can use this page to enter changes more quickly than using the other pages or to review all the type information at once. 

All type library elements have a text page that displays the IDL or Object Pascal syntax for the element. The Type Library page of the Environment Options dialog determines which language is used on the text page. Any changes you make in other pages of the element are reflected here. If you add IDL or Object Pascal code directly in the text page, changes are reflected in the other pages of the Type Library editor.

Note: The Type Library editor generates syntax errors if you add IDL identifiers that are currently not supported by the editor; the editor currently supports only those IDL identifiers that relate to type library support (not RPC support).

Lists various attributes that modify the object described on the Attributes page. This page is not available for all elements. 

Some type library elements have flags that let you enable or disable certain characteristics or implied capabilities. The flags page lists several check boxes let you turn these flags on or off.

Only available when the type library is selected in the Object List pane. Lists other type libraries that contain definitions on which this one depends. 

To add a dependency, check the box to the left of the type library name. The definitions in that type library can then be used by this one. If the type library you want to add is not in the list, right click and choose Show All Type Libraries. 

To remove a dependency, uncheck the box to the left of a type library name. 

To view one of the other type libraries, select that type library, right click and choose View Type Library.

Only available when a CoClass is selected in the Object List pane. Lists the interfaces that the CoClass implements. Use this page to change the interfaces associated with the object or change their properties.

Item 
Description 
Interface  
Name of an interface or dispinterface that the CoClass supports. Note that the name for interfaces and dispinterfaces is assigned on the Attributes page when the interface is selected.  
GUID  
The globally unique identifier for the interface. This column is informational only: its value can’t be changed.  
Source  
Indicates whether the interface functions as an event source. If so, the CoClass does not implement the interface. Rather, clients implement the interface and the CoClass calls them using this interface when it fires events.  
Default  
Indicates that the interface or dispinterface represents the default interface. This is the interface that is returned by default when an instance of the class is created. A CoClass can have two default members at most. One represents the primary interface, and the other represents an optional dispinterface that serves as an event source.  
Restricted  
Prevents the item from being used by a programmer. An interface cannot have both restricted and default attributes.  
VTable  
Indicates whether interface methods can be called using a VTable (as opposed to IDispatch calls). This column is informational only: its value can’t be changed.  

Use this page to change the transaction attribute of a transactional object you will install with MTS or the COM+ attributes of a CoClass you will install with COM+. 

You can also use this page for Automation objects that were not created using the Transactional Object wizard, and it will influence the way the IDE installs them into MTS packages or COM+ applications. However, objects that are not created using the wizard do not automatically include support for IObjectControl. This means that they are not notified about activation and deactivation (and so do not have OnActivate and OnDeactivate events). They also do not have an ObjectContext property. You must therefore obtain the object context by calling the global GetObjectContext function.

Note: Only the Transaction Model attribute is used when installing into an MTS package, all other settings are ignored. If you intend to install the object under MTS, it must be an Automation object in an in-process server (DLL).
Warning: The attributes you specify on the COM+ page are encoded as custom data in the type library. This data is not recognized outside of Delphi. Therefore, it only has an effect if you install the transactional object from the IDE. If you deploy your object in any other way, these settings must be explicitly set using the MTS Explorer or COM+ Component Manager.

Item 
Description 
Call Syncronization  
COM+ only: Determines how the object participates in activities. These provide additional synchronization support beyond that supplied by the threading model.  
Transaction Model  
Specifies the transaction attribute, which indicates how the object participates in transactions, if at all. The possible values differ depending on whether the object is to be deployed under MTS or COM+. Note that if the transaction attribute indicates that transactions are supported, Just In time Activation must be enabled.  
Object Pooling  
COM+ only: Determines whether object instances can be pooled. When enabling Object Pooling, it is your responsibility to ensure that the object is stateless.  
Creation TimeOut  
COM+ only: Determines how long, in milliseconds, a pooled object remains in the object pool before it is freed.  
Allow Inproc Subscribers  
Only applicable when the CoClass represents a COM+ event object. Determines whether in-process applications can register interest as clients of the event object.  
Fire In Parallel  
Only applicable when the CoClass represents a COM+ event object.Determines whether COM+ fires events in parallel (on multiple threads), or one by one on the same thread.  

Only available when a property or method is selected in the Object List pane. It lets you set the parameters and return value for methods (including property access methods).

Item 
Description 
Name  
Represents the parameter name. You can edit the value directly.  
Type  
Represents the data type of the parameter. Select an available type from the drop-down list that appears when you click in the Type column.  
Default Value  
Specify a default value for an optional parameter by typing it into the column. All subsequent parameters must be optional. Any preceding optional parameters should also have a default value.
When working in Object Pascal, local IDs are specified using a parameter type specifier of TLCID. In IDL, this is specified using a parameter modifier.  
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!