System.Generics.Defaults.TSingletonImplementation.QueryInterface

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

Type Visibility Source Unit Parent
function protected
System.Generics.Defaults.pas
System.Generics.Defaults.hpp
System.Generics.Defaults TSingletonImplementation

Description

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

QueryInterface checks whether the object that implements this interface supports the interface specified by IID. If so, QueryInterface sets the Obj parameter so that it points to an instance of the specified interface. If the object supports the interface, 0 is returned; otherwise QueryInterface returns a nonzero error code such as E_NOINTERFACE.

See Also