以下_Smss1是调用函数,__Smss是事件函数。怎么用VC调用,请帮写个函数,谢谢!!!class _Smss1 : public COleDispatchDriver
{
public:
_Smss1() {} // Calls COleDispatchDriver default constructor
_Smss1(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
_Smss1(const _Smss1& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}// Attributes
public:// Operations
public:
CString GetMSignal();
void SetMSignal(LPCTSTR lpszNewValue);
short GetMIndex();
void SetMIndex(short nNewValue);
CString GetNumber();
void SetNumber(LPCTSTR lpszNewValue);
BOOL GetEn();
void SetEn(BOOL bNewValue);
CString GetTime();
void SetTime(LPCTSTR lpszNewValue);
BOOL GetOk();
void SetOk(BOOL bNewValue);
CString GetMessage();
void SetMessage(LPCTSTR lpszNewValue);
CString GetCenter();
void SetCenter(LPCTSTR lpszNewValue);
BOOL GetFlag();
void SetFlag(BOOL bNewValue);
short GetWaitTime();
void SetWaitTime(short nNewValue);
BOOL GetMCommType();
void SetMCommType(BOOL bNewValue);
BOOL GetCommOpen();
void SetCommOpen(BOOL bNewValue);
short GetMCommPort();
void SetMCommPort(short nNewValue);
BOOL GetMCommRev();
void SetMCommRev(BOOL bNewValue);
BOOL GetMDelete();
void SetMDelete(BOOL bNewValue);
BOOL GetMStatus();
void SetMStatus(BOOL bNewValue);
VARIANT mset();
VARIANT mrset();
VARIANT mdelall();
VARIANT csq();
VARIANT Sendpro();
VARIANT recpro();
BOOL GetMCountry();
void SetMCountry(BOOL bNewValue);
CString GetMZipcode();
void SetMZipcode(LPCTSTR lpszNewValue);
};
/////////////////////////////////////////////////////////////////////////////
// __Smss1 wrapper classclass __Smss1 : public COleDispatchDriver
{
public:
__Smss1() {} // Calls COleDispatchDriver default constructor
__Smss1(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
__Smss1(const __Smss1& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}// Attributes
public:// Operations
public:
void MReceieved(BSTR* mgetmes, BSTR* mgetnum, BSTR* mgetcenter, BSTR* mgettim);
void MSend(BSTR* data);
void MSignal(BSTR* data);
void MCMTI(BSTR* data);
void MevMsg(BSTR* data);
void MerMsg(BSTR* data);
void MDelMsg(BSTR* data);
};
我的调用只能调用函数不能激发事件,为什么?????
_Smss1 *m_sms;
m_sms = new _Smss1();
m_sms->SetMCommPort(1);
m_sms->SetMCommType(false); m_sms->SetCenter("13800100500");
m_sms->SetEn(false); m_sms->SetMCommRev(true); m_sms->SetMDelete(false);
int i = 2; CString thing , clint, center, clinttime, output;
m_sms->SetMIndex(i);
m_sms->recpro();
thing = m_sms->GetMessage();
clint = m_sms->GetNumber();
center = m_sms->GetCenter();
clinttime = m_sms->GetTime();
output = thing + " " + clint + " " + center + " " + clinttime ;
MessageBox(output);
delete m_sms;
.
.
.
.
请帮助,sos谢谢!!!!!!!!!!!!
{
public:
_Smss1() {} // Calls COleDispatchDriver default constructor
_Smss1(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
_Smss1(const _Smss1& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}// Attributes
public:// Operations
public:
CString GetMSignal();
void SetMSignal(LPCTSTR lpszNewValue);
short GetMIndex();
void SetMIndex(short nNewValue);
CString GetNumber();
void SetNumber(LPCTSTR lpszNewValue);
BOOL GetEn();
void SetEn(BOOL bNewValue);
CString GetTime();
void SetTime(LPCTSTR lpszNewValue);
BOOL GetOk();
void SetOk(BOOL bNewValue);
CString GetMessage();
void SetMessage(LPCTSTR lpszNewValue);
CString GetCenter();
void SetCenter(LPCTSTR lpszNewValue);
BOOL GetFlag();
void SetFlag(BOOL bNewValue);
short GetWaitTime();
void SetWaitTime(short nNewValue);
BOOL GetMCommType();
void SetMCommType(BOOL bNewValue);
BOOL GetCommOpen();
void SetCommOpen(BOOL bNewValue);
short GetMCommPort();
void SetMCommPort(short nNewValue);
BOOL GetMCommRev();
void SetMCommRev(BOOL bNewValue);
BOOL GetMDelete();
void SetMDelete(BOOL bNewValue);
BOOL GetMStatus();
void SetMStatus(BOOL bNewValue);
VARIANT mset();
VARIANT mrset();
VARIANT mdelall();
VARIANT csq();
VARIANT Sendpro();
VARIANT recpro();
BOOL GetMCountry();
void SetMCountry(BOOL bNewValue);
CString GetMZipcode();
void SetMZipcode(LPCTSTR lpszNewValue);
};
/////////////////////////////////////////////////////////////////////////////
// __Smss1 wrapper classclass __Smss1 : public COleDispatchDriver
{
public:
__Smss1() {} // Calls COleDispatchDriver default constructor
__Smss1(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
__Smss1(const __Smss1& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}// Attributes
public:// Operations
public:
void MReceieved(BSTR* mgetmes, BSTR* mgetnum, BSTR* mgetcenter, BSTR* mgettim);
void MSend(BSTR* data);
void MSignal(BSTR* data);
void MCMTI(BSTR* data);
void MevMsg(BSTR* data);
void MerMsg(BSTR* data);
void MDelMsg(BSTR* data);
};
我的调用只能调用函数不能激发事件,为什么?????
_Smss1 *m_sms;
m_sms = new _Smss1();
m_sms->SetMCommPort(1);
m_sms->SetMCommType(false); m_sms->SetCenter("13800100500");
m_sms->SetEn(false); m_sms->SetMCommRev(true); m_sms->SetMDelete(false);
int i = 2; CString thing , clint, center, clinttime, output;
m_sms->SetMIndex(i);
m_sms->recpro();
thing = m_sms->GetMessage();
clint = m_sms->GetNumber();
center = m_sms->GetCenter();
clinttime = m_sms->GetTime();
output = thing + " " + clint + " " + center + " " + clinttime ;
MessageBox(output);
delete m_sms;
.
.
.
.
请帮助,sos谢谢!!!!!!!!!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货