我想在Visual C++中针对XSD模式验证XML文件。我环顾了互联网,我发现的MSXML例子似乎是最直接的。可能的标题冲突
我正在尝试将this集成到我正在处理的项目中。我创建了XMLSchemaValidation
类来对某些XSD模式执行验证,并使用相应的XSD文件名初始化对象。我在头文件中的下列指令:
#import "C:\Windows\System32\msxml6.dll"
,但我开始收到以下错误的looot:
7>d:\proiecte\wtlcommon\basegui\gdiplushelpers.h(28): error C2872: 'Font' : ambiguous symbol
7> could be 'c:\program files (x86)\microsoft visual studio 10.0\vc\include\comdef.h(312) : Font'
7> or 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gdiplusheaders.h(244) : Gdiplus::Font'
,我也得到:
7>...\wizarddlgskin.h(96): error C2259: 'Font' : cannot instantiate abstract class
7> due to following members:
7> 'HRESULT IUnknown::QueryInterface(const IID &,void **)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\unknwn.h(116) : see declaration of 'IUnknown::QueryInterface'
7> 'ULONG IUnknown::AddRef(void)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\unknwn.h(120) : see declaration of 'IUnknown::AddRef'
7> 'ULONG IUnknown::Release(void)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\unknwn.h(122) : see declaration of 'IUnknown::Release'
7> 'HRESULT IDispatch::GetTypeInfoCount(UINT *)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\oaidl.h(2123) : see declaration of 'IDispatch::GetTypeInfoCount'
7> 'HRESULT IDispatch::GetTypeInfo(UINT,LCID,ITypeInfo **)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\oaidl.h(2126) : see declaration of 'IDispatch::GetTypeInfo'
7> 'HRESULT IDispatch::GetIDsOfNames(const IID &,LPOLESTR *,UINT,LCID,DISPID *)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\oaidl.h(2131) : see declaration of 'IDispatch::GetIDsOfNames'
7> 'HRESULT IDispatch::Invoke(DISPID,const IID &,LCID,WORD,DISPPARAMS *,VARIANT *,EXCEPINFO *,UINT *)' : is abstract
7> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\oaidl.h(2138) : see declaration of 'IDispatch::Invoke'
我最初有#import <msxml.dll>
与示例代码一样,但MSXML安装不会将这些文件放在W7上的位置。
我已经在stdafx.h中文件中删除#define WIN32_LEAN_AND_MEAN
(Errors using msxml6.h on visual c++)
我在做什么错?
如果你可以发布你的代码,人们可以更好地帮助你。 – doptimusprime