COleDispatchDriver::operator LPDISPATCH

访问 COleDispatchDriver 对象的基础 IDispatch 指针。

operator LPDISPATCH( );

示例

COleDispatchDriver disp;
if (disp.CreateDispatch(_T("WMPlayer.OCX")))
{
   IDispatch* pDispatch = disp; //COleDispatchDriver::operator
                                //LPDISPATCH is called here
   IUnknown* pUnkn = NULL;
   HRESULT hr = pDispatch->QueryInterface(IID_IUnknown ,(void**)&pUnkn);
   if (SUCCEEDED(hr))
   {
      //Do something...
      pUnkn->Release();
   }
}

要求

Header: afxdisp.h

请参见

参考

COleDispatchDriver选件类

层次结构图

COleDispatchDriver::m_lpDispatch