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