LPDISPATCH COleDispatchDriver::operator
存取 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