RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ComObj.GetActiveOleObject Function

Retrieves a reference to an IDispatch interface to a currently running, registered COM object.

Pascal
function GetActiveOleObject(const ClassName: string): IDispatch;
C++
IDispatch GetActiveOleObject(const AnsiString ClassName);

ComObj

GetActiveOleObject returns a reference to the IDispatch interface of the active object for the given class indicated by ClassName. ClassName is the programmatic ID for the class of the active object from the OLE running object table. GetActiveOleObject is used to access the OLE running object table. To add an object to this table, use the RegisterActiveObject API. 

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

 

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