RAD Studio VCL Reference
TInterfacedPersistent.QueryInterface Method

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

function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;
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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!