Afficher : Delphi C++
Préférences d'affichage

System.TInterfacedObject.QueryInterface

De XE2 API Documentation

Delphi

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

C++

HRESULT __stdcall QueryInterface(const GUID& IID, /* out */ void *Obj);
HRESULT __stdcall QueryInterface(DelphiInterface<T>& smartIntf)

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

Versions précédentes
Traductions