IUnknown::QueryInterface method

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

pp

Type: void**

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

arg2

Return Value

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

Requirements

   
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