描述:
// TODO: 在此添加控件通知处理程序代码
CoInitialize(NULL);
HRESULT hr = S_OK;
CBusSmsWebServiceImplService* p = new CBusSmsWebServiceImplService;
BSTR action = _bstr_t("ADDDCSMS");
BSTR xmlPara = _bstr_t("<sms><callingId>057181509638</callingId><calledId>13306520172</calledId><customerId>057181502223</customerId><status>1</status><backNum>057181520925</backNum><custAreaCode>0571</custAreaCode></sms>");
BSTR* bReturn = NULL;
hr = p->doService(action, xmlPara, bReturn);
if (FAILED(hr))
{
cout << "FAILED" << endl;
}
else
{
cout << "SUCCESS" << endl;
}
delete p;
CoUninitialize();
doService是webService提供的接口。hr的值是E_POINTER,不知道是什么原因。
求大神指点
解决方案1:
可能还得调用CreateXX之类的
解决方案2:应该是你还没创建 webservice的接口指针。用 new 方式创建应该还不行