求助:VC如何调用XML数据,写个简单的例子被 20
2个回答
展开全部
C++中使用DOM读取并显示XML文档内容:
http://hi.baidu.com/xiaomeng008/blog/item/5d8af90fc843e1c07acbe101.html
自己好好看看这篇文章吧!!!
http://hi.baidu.com/xiaomeng008/blog/item/5d8af90fc843e1c07acbe101.html
自己好好看看这篇文章吧!!!
展开全部
oke()
{
// TODO: Add your control notification handler code here
int Result;
CString str;
UpdateData(TRUE);
CoInitialize(0);
IMyTest *pMyTest=NULL;
IUnknown *pIUnknown=NULL;
HRESULT hr=::CoCreateInstance(CLSID_MyTest,NULL,CLSCTX_INPROC_SERVER,IID_IMyTest,(void **)&pMyTest);
if(SUCCEEDED(hr))
{
hr=pMyTest->GetPlus(m_Add1,m_Add2,&Result);
if(SUCCEEDED(hr))
{
str.Format("%d",Result);
SetDlgItemText(IDC_STATIC_RESULT,str.GetBuffer(0));
}
pMyTest->Release();
}
else
AfxMessageBox("Can not find the COM object...");
CoUninitialize();
}
{
// TODO: Add your control notification handler code here
int Result;
CString str;
UpdateData(TRUE);
CoInitialize(0);
IMyTest *pMyTest=NULL;
IUnknown *pIUnknown=NULL;
HRESULT hr=::CoCreateInstance(CLSID_MyTest,NULL,CLSCTX_INPROC_SERVER,IID_IMyTest,(void **)&pMyTest);
if(SUCCEEDED(hr))
{
hr=pMyTest->GetPlus(m_Add1,m_Add2,&Result);
if(SUCCEEDED(hr))
{
str.Format("%d",Result);
SetDlgItemText(IDC_STATIC_RESULT,str.GetBuffer(0));
}
pMyTest->Release();
}
else
AfxMessageBox("Can not find the COM object...");
CoUninitialize();
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询