RAD Studio VCL Reference
TInterfacedObject::QueryInterface Method

Implements the IInterface System::TInterfacedObject::QueryInterface method.

function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
__stdcall HResult QueryInterface(const TGUID IID, out  Obj);

Do not call the protected System::TInterfacedObject::QueryInterface method directly. System::TInterfacedObject::QueryInterface is called through IInterface 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 System::TInterfacedObject::QueryInterface returns S_OK. If the object does not support the interface, System::TInterfacedObject::QueryInterface returns E_NOINTERFACE

If System::TInterfacedObject::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!