System.Classes.TInterfacedPersistent.QueryInterface

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

virtual HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TInterfacedPersistent

Description

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

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.

See Also