RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAutoObject Class

TAutoObject is a CoClass that supports the IDispatch interface, and that can be used as a base class for ActiveX Automation servers.

Pascal
TAutoObject = class(TTypedComObject, IDispatch);
C++
class TAutoObject : public TTypedComObject, public IDispatch;

ComObj

TAutoObject is used as a base class for ActiveX control classes and provides support for ActiveX Automation objects. 

To create a new Automation object, use the Automation wizard. The steps for creating an Automation object are covered in depth in the Developer's Guide or in the online document, Developing COM-based applications. 

By implementing the IDispatch interface, TAutoObject encapsulates the following functionality: 

Provides access to properties and methods exposed by an object by calling a method or by accessing a property of a specified dispatch interface (dispinterface), given any necessary parameters. 

Converts text names of properties and methods (including their arguments) to their corresponding DISPIDs which identify them. 

Determines whether there is type information available for this dispatch interface. 

Retrieves the type information for a specified dispatch interface. 

TAutoObject requires a type library because it supports dual interfaces, and because it inherits the IProvideClassInfo interface support which requires a type library. TAutoObject has a class factory. For creating automation objects that are used internally and do not need a class factory, use TAutoIntfObject as a base class. 

GetIDsOfNames, GetTypeInfo, GetTypeInfoCount, and Invoke

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!