RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponent.QueryInterface Method

Returns a reference to a specified interface if the object supports that interface.

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

QueryInterface checks whether the component supports the interface specified by IID, and if so, returns a reference to that interface as the Obj parameter. If the component does not support the interface, the Obj parameter returns nil (Delphi) or NULL (C++).

Note: For components that act as COM object wrapper, QueryInterface calls the QueryInterface method of the internal COM object.
 

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