Class AutomationObject() Foundation

Class function of the AutomationObject class

Description

Objects of the class AutomationObject serve as proxies to COM/ActiveX components. The properties and methods of the COM/ActiveX component can be accessed via instance variables and methods of the AutomationObject.

For an overview on how an AutomationObject can be used please also be referred to ActiveX Overview .

AutomationObjects can be created and connected to COM/ActiveX components by the functions GetObject() and CreateObject()and by calling the class method AutomationObject():create().

Once the AutomationObject is created and the connection to the COM/ActiveX object is established, calling methods and accessing properties of the COM/ActiveX component is as easy as with ordinary Xbase++ objects. The AutomationObject takes care of forwarding method and property calls to the COM/ActiveX object.

Class methods
:create()
Creates and connects to a COM/ActiveX object
Life cycle
:destroy()
Disconnects from a COM/ActiveX component.
:dynamicCast()
Converts (casts) an AutomationObject instance to another class.
IUnknown
:addRef()
Increments the reference count.
:release()
Decrements the reference count.
:queryInterface()
Queries a dedicated interface
IDispatch
:getIDsOfNames()
Queries the dispatch IDs of properties and methods
:invoke()
Invokes a method or property.
ActiveX access
:loadTypeLib()
Loads a typelibrary.
:getProperty()
Gets the value of a property.
:setProperty()
Sets the value of a property
:callMethod()
Calls a method.
Automation Error Management
:onError()
Default error handler for errors generated in the automation sub-system.
COM class management
:isInstalled()
Determines if a COM/ActiveX component is installed on the computer.
:requestLicenseKey()
Requests the license key of a COM/ActiveX component.
:translateColor()
Translates a COM/ActiveX color value to an Xbase++ color and vice versa
Instance variables
:interface
Interface of the connected COM/ActiveX object.
:interfaceName
Name of the COM interface used to connect to the COM/ActiveX object.
:license
Optional license string.
:CLSID
Class ID or ProgID identifying the COM object connected.
:server
Name of the remote machine/server that hosts the COM/ActiveX component.
:cargo
Instance variable for storing an application-defined value.
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.