程序代码
/*IXMLDOMNode* GetNodeByElement(IXMLDOMElement* pElement)
功能:根据元素指针得到相应的节点指针
参数;IXMLDOMElement* pElement-元素指针*/
MSXML2::IXMLDOMNode* ParseXMLDOM::GetNodeByElement(MSXML2::IXMLDOMElement* pElement)
{
MSXML2::IXMLDOMNode* pNode=NULL;
pElement->QueryInterface(IID_IXMLDOMNode,(void**)&pNode);
return pNode;
}
一运行就说 error C2065: 'IID_IXMLDOMNode' : undeclared identifier,是怎么回事啊
谢谢赐教
/*IXMLDOMNode* GetNodeByElement(IXMLDOMElement* pElement)
功能:根据元素指针得到相应的节点指针
参数;IXMLDOMElement* pElement-元素指针*/
MSXML2::IXMLDOMNode* ParseXMLDOM::GetNodeByElement(MSXML2::IXMLDOMElement* pElement)
{
MSXML2::IXMLDOMNode* pNode=NULL;
pElement->QueryInterface(IID_IXMLDOMNode,(void**)&pNode);
return pNode;
}
一运行就说 error C2065: 'IID_IXMLDOMNode' : undeclared identifier,是怎么回事啊
谢谢赐教
// to the Tools->Options...->Directories in Visual Studio.
//
// You might also need to append "msxml2.lib" to the
// Project->Settings...->Link->Object/Libray Modules field.
Automation is enabled for the class to enable it to connect
to the Connection point (DIID_XMLDOMDocumentEvents).
该怎末解决?
#include "msxml.h"# import <msxml4.dll> raw_interfaces_only你试试看吧