There are currently 2 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1312 1
【MSXML6】【方法】IXMLDOMNode对象转IXMLDOMElement的方法
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 12/21/16 14:51

IXMLDOMNode *pNode;

//..........
IXMLDOMElement *pElem;
方法1(推荐):
hr = pNode->QueryInterface(&pElem);
方法2:
hr = pNode->QueryInterface(IID_IXMLDOMElement, (LPVOID *)&pElem);
方法3:
hr = pNode->QueryInterface(IID_PPV_ARGS(&pElem));

if (SUCCEEDED(hr))
{
    //.....
    pElem->Release();
}

巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 1/6/17 10:14
其中的hr变量的类型是HRESULT。
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1312 Replies: 1
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 1/6/17 10:14
Bar Good Posts
Announcements