_com_ptr_t::QueryInterface

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _com_ptr_t::QueryInterface.

Microsoft Specific**

Calls the QueryInterface member function of IUnknown on the encapsulated interface pointer.

  
      template<typename _InterfaceType> HRESULT QueryInterface (  
   const IID& iid,  
   _InterfaceType*& p   
) throw ( );  
template<typename _InterfaceType> HRESULT QueryInterface (  
   const IID& iid,  
   _InterfaceType** p  
) throw( );  

Parameters

iid
IID of an interface pointer.

p
Raw interface pointer.

Calls IUnknown::QueryInterface on the encapsulated interface pointer with the specified IID and returns the resulting raw interface pointer in p. This routine returns the HRESULT to indicate success or failure.

END Microsoft Specific

_com_ptr_t Class

Show: