RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System::Variant::GetActiveObject

Retrieves a reference to an IDispatch interface of a currently running, registered OLE Automation object, and returns it as a System::Variant::Variant.

System::Variant::GetActiveObject returns a reference to the IDispatch interface of the active object for the given class indicated by ProgID. ProgID is the programmatic ID for the class of the active object from the OLE registration database. 

If either the class object or the IDispatch interface is not successfully returned, an EOleSysError exception is thrown.

Tip: If the Automation object is not running or not registered, use the CreateObject member of System::Variant::Variant to run it.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!