IUnknown::QueryInterface(Q**) method (unknwn.h)

A helper function template that infers an interface identifier, and calls QueryInterface(REFIID,void).

Syntax

template<class Q>
HRESULT
STDMETHODCALLTYPE
QueryInterface(_COM_Outptr_ Q** pp)
{
    return QueryInterface(__uuidof(Q), (void **)pp);
}

The class Q template parameter is the type of a COM interface.

Parameters

[out] pp

Type: void**

The address of a pointer to an interface. For details, see the ppvObject parameter of QueryInterface(REFIID,void).

Return value

The function passes the return value back from QueryInterface(REFIID,void).

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header unknwn.h

See also