ComObject.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.

class ComObject
extern (Windows) @nogc
HRESULT
QueryInterface
(
const(IID)* riid
,
out void* ppvObject
)

Parameters

riid const(IID)*

Pointer to the Guid of the interface being queried for.

ppvObject void*

Pointer to pointer to store result of operation.

Return Value

Type: HRESULT

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

Meta