Skip to main content

TcxIUnknownObject.QueryInterface(TGUID,Untyped) Method

Provides access to the implementation of the specified interface if the current object supports it.

Declaration

function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;

Parameters

Name Type
IID TGUID
Obj

Returns

Type
HRESULT

Remarks

Call this function and pass a supported interface’s globally unique 128-bit identifier (GUID) as the IID parameter to obtain a reference to the interface implementation via the Obj parameter. The function returns the S_OK Windows API code, internally calls the _AddRef function, and creates a new reference to a TcxIUnknownObject class descendant instance, provided that the class implements the interface; otherwise, the QueryInterface function returns the E_NOINTERFACE error code.

See Also