_com_ptr_t::QueryInterface

Microsoft 专用

调用封装的接口指针上的 IUnknownQueryInterface 成员函数。

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

参数

  • iid
    接口指针的 IID

  • p
    原始接口指针。

备注

对具有指定 IID 的已封装接口指针调用 IUnknown::QueryInterface 并返回 p 中生成的原始接口指针。 此例程返回 HRESULT 以指示成功或失败。

结束 Microsoft 专用

请参见

参考

_com_ptr_t 类