Type Library

Visual LANSA

Type Library

When you enrol an ActiveX component by specifying its ProgID property, in  most cases LANSA automatically determines the type library which contains this component. This means that you do not normally need to worry about specifying the type library of a component.

A type library can contain more than one component. For example the type library that contains the keyboard control also contains other controls. You can see this if you select the Keyboard control's TypeLibId property in the Properties tab of the component and click on the button with three dots. Its type library is displayed.

As you can see, the name of the type library of the keyboard control used in the previous examples is Iocomp Professional Component Pack. Expand the items under the library. Notice it contains several creatable components.

You will be able to access the other controls in the type library using this component.

Internally the purpose of type libraries is to provide an interface which lets applications know how to interact with the ActiveX component. The library describes in detail the classes in the component and their methods, properties, events, constants etc.

To see the contents of the Iocomp Professional Component Pack type library, select the keyboard control and then display its  Features help (F2). In the Features window drop down the list of classes in this library:

 

A type library contains these types:

CoClasses

Defines classes that can be used to create objects. A CoClass has events, methods and properties.

Interfaces

Defines a set of methods and properties. A coclass implements an interface to use the interface's methods and properties.

Enumerations

Constants used to make code more readable.

Aliases

Alternative names used to make code more readable.

Ý 7.1.6 ActiveX Terminology