IUnknown.QueryInterface

Queries a COM object for a pointer to one of its interface.

Note: Because you pass the address of an interface pointer, the method can overwrite that address with the pointer to the interface being queried for. Upon successful return, *ppvObject (the dereferenced address) contains a pointer to the requested interface. If the object doesn't support the interface, the method sets *ppvObject (the dereferenced address) to null.

  1. HRESULT QueryInterface(const(IID)* riid, void* ppvObject)
    interface IUnknown
    extern (Windows) @nogc
    QueryInterface
    (
    const(IID)* riid
    ,
    out void* ppvObject
    )
  2. HRESULT QueryInterface(T** pvObject)

Parameters

riid const(IID)*

Reference to the Guid of the interface being queried for.

ppvObject void*

Reference to a pointer to store result of operation in.

Return Value

Type: HRESULT

S_OK if supported, E_NOINTERFACE otherwise. If ppvObject is null, returns E_POINTER.

Meta