System.Generics.Defaults.TSingletonImplementation.QueryInterface
Delphi
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
C++
HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
プロパティ
| 種類 | 可視性 | ソース | ユニット | 親 |
|---|---|---|---|---|
| function | protected | System.Generics.Defaults.pas System.Generics.Defaults.hpp |
System.Generics.Defaults | TSingletonImplementation |
説明
指定されたインターフェイスをオブジェクトがサポートしている場合、そのインターフェイスへの参照を返します。
QueryInterface では、このインターフェイスを実装するオブジェクトが IID で指定されるインターフェイスをサポートしているかどうかを調べます。サポートしている場合、QueryInterface は、指定されたインターフェイスのインスタンスを指すように Obj パラメータを設定します。オブジェクトがそのインターフェイスをサポートしている場合、QueryInterface は 0 を返し、そうでない場合は、E_NOINTERFACE などのゼロでないエラー コードを返します。