System.TInterfacedObject.QueryInterface

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

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

C++

HRESULT __stdcall QueryInterface(REFIID IID, /* out */ void *Obj);

Propriétés

Type Visibilité  Source Unité  Parent
function protected
System.pas
systobj.h
System TInterfacedObject

Description

Implémente la méthode IInterface QueryInterface.

N'appelez pas directement la méthode protégée QueryInterface. QueryInterface est appelée via l'interface IInterface afin d'obtenir un pointeur d'interface pour l'interface identifiée par le paramètre IID. Si l'objet supporte l'interface requise, il est renvoyé dans le paramètre Obj et QueryInterface renvoie S_OK. Si l'objet ne supporte pas l'interface, QueryInterface renvoie E_NOINTERFACE.

Si QueryInterface parvient à renvoyer un pointeur d'interface, elle incrémente automatiquement le compteur de références.

Voir aussi