From RAD Studio API Documentation
Jump to: navigation, search



TTypedComObject = class(TComObject, IProvideClassInfo)


class PASCALIMPLEMENTATION TTypedComObject : public TComObject


Type Visibility Source Unit Parent
class public
System.Win.ComObj System.Win.ComObj


TTypedComObject supports the IProvideClassInfo interface and is the class type for COM objects that can provide the type information without requiring a type library to be loaded.

TTypedComObject supports the IProvideClassInfo interface which gives an object the ability to describe its interfaces and types when everything else about it, such as its class identifier (CLSID), is unknown. TTypedComObject requires a type library for the IProvideClassInfo interface. This class is designed to require a type library so that it can support dual interfaces, which are created by default.

IProvideClassInfo has a single method, GetClassInfo, which is implemented in TTypedComObject to provide access to the type information for the object's CoClass entry in its type library. This means that if the TTypedComObject has a running instance, a client can query for the IProvideClassInfo interface and retrieve this information without having to load and navigate a type library to find the ITypeInfo pointer for the object's CoClass.

Use TTypedComObject as a base class for objects that can conveniently provide type information without having to load a type library, such as an unknown object received through a drag-and-drop operation. The only objects that must implement IProvideClassInfo are those with custom events such as ActiveX controls.

Note: There is no support for type information in a particular language. Type information appropriate to the user's international settings on the current machine is assumed to have been loaded.


See Also