RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInterfacedPersistent.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 implements the IInterface method, QueryInterface. This method checks whether the interfaced persistent object supports the interface identified by IID. If so, it returns a reference as the Obj parameter, automatically incrementing the reference count for the interface. If the object does not support the specified interface, it returns a non-zero value. 

 

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