The following is his class declaration
class CPlayer: public COleDispatchDriver
{
Public:
COleDispatchDriver CPlayer () {}//call the default constructor
CPlayer (LPDISPATCH pDispatch) : COleDispatchDriver (pDispatch) {}
CPlayer (const CPlayer& DispatchSrc) : COleDispatchDriver (dispatchSrc) {}
//feature
Public:
//
Public:
Void Open (LPCTSTR strUrl)
{
The static BYTE parms []=VTS_BSTR;
InvokeHelper (0 x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strUrl);
}
};
Then I wrote in the code of CPlayer a;
A.O pen (_T (" E: \ \ 010. The video player servo drives with main components that 04 mp4 "));
Run after the prompt: Warning: attempt to call Invoke with NULL m_lpDispatch!
This is the reason why, I am a rookie, may be CPlayer (LPDISPATCH pDispatch) : COleDispatchDriver pDispatch (a) {} this reason, there are a great god can help next, please appreciate ~ ~ ~ ~ ~ ~ ~
CodePudding user response:
CreateDispatch