I want to validate XML files against XSD schemas in Visual C++. I looked around the internet and the MSXML examples I found seemed to be the most straightforward.
I'm trying to integrate this into the project I'm working on. I created XMLSchemaValidation
class to perform validations for certain XSD schemas and I initialize the objects with the corresponding XSD file name. I have the following directives in the header file:
#import "C:\Windows\System32\msxml6.dll"
but I started getting a looot of the following error:
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'
and I also get:
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'
I initially had #import <msxml.dll>
as in the example code, but MSXML installation doesn't put the files where they say it does on W7.
I already removed #define WIN32_LEAN_AND_MEAN
in stdafx.h file ( Errors using msxml6.h on visual c++ )
What am I doing wrong?