Show: Delphi C++
Display Preferences

System.Win.ComObj.GetActiveOleObject

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetActiveOleObject(const ClassName: string): IDispatch;

C++

extern DELPHI_PACKAGE _di_IDispatch __fastcall GetActiveOleObject(const System::UnicodeString ClassName);

Properties

Type Visibility Source Unit Parent
function public
System.Win.ComObj.pas
System.Win.ComObj.hpp
System.Win.ComObj System.Win.ComObj

Description

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

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.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance