VC++ 6 to VC++ 2008 migration error IXMLDOMNode' : ambiguous symbol

I am migrating my VC++ 6 project to Visual Studio 2008.

Vc++ 2008 giving the following error during compilation.
The header file has the following declaration

#import "msxml6.dll"      
using namespace MSXML2;

c:\Test\source\MyApp\../ptmMigration/ptmPolicy.h(321) : error C2872: 'tagDOMNodeType' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(350) : tagDOMNodeType'
        or       'c:\Test\source\MyApp\../ptmMigration\debug\msxml6.tlh(352) : MSXML2::tagDOMNodeType'
c:\Test\source\MyApp\../ptmMigration\../ptmMigration/ptmPolicy.h(321) : error C2872: 'IXMLDOMNode' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(531) : IXMLDOMNode'

Thanks in advance.
Who is Participating?
pgnatyukConnect With a Mentor Commented:

You will find this code:

#import "c:\winnt\system32\msxml4.dll"
using namespace MSXML2;

int main(int argc, char* argv[])
      IXMLDOMDocumentPtr dom(__uuidof(DOMDocument40));

change for 6 and try.

Here is a solution from Microsoft:;EN-US;269194
Can you check that:

#import  raw_interfaces_only
using namespace MSXML2;

The following link may help:

bobbeyAuthor Commented:
#import <msxml6.dll> raw_interfaces_only
using namespace MSXML2;
But that didnt work, same set of errors again.
So remove namespace MSXML2 and use MSXML2::IXMLDOMNode explicitly
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.