RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInvokableClass.QueryInterface Method

Implements the IInterface QueryInterface method.

Pascal
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
C++
__fastcall __stdcall HRESULT QueryInterface(const TGUID IID,  Obj);

Do not call the protected QueryInterface method directly. QueryInterface is called through the IInterface interface to obtain an interface pointer for the interface identified by the IID parameter. If the object supports the requested interface, it is returned in the Obj parameter and QueryInterface returns S_OK. If the object does not support the interface, QueryInterface returns E_NOINTERFACE.  

If QueryInterface successfully returns an interface pointer, it automatically increments the reference count. 

 

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