Udostępnij za pośrednictwem


CComPtrBase::QueryInterface

Call this method to return a pointer to a specified interface.

template < 
   class Q 
> HRESULT QueryInterface(Q** pp ) const throw( );

Parameters

  • Q
    The object type whose interface pointer is required.

  • pp
    Address of output variable that receives the requested interface pointer.

Return Value

Returns S_OK on success, or E_NOINTERFACE on failure.

Remarks

This method calls IUnknown::QueryInterface.

In debug builds, an assertion error will occur if pp is not equal to NULL.

Requirements

Header: atlcomcli.h

See Also

Reference

CComPtrBase Class

CComPtrBase::SetSite

Other Resources

CComPtrBase Members