import "../mssoap30.dll" error C2872: 'tagDOMNodeType' : ambiguous symbol

I am using #import "../mssoap30.dll" named_guids in the .cpp file,

and the header
#import "msxml6.dll"

but the compilation giving the error

 error C2872: 'tagDOMNodeType' : ambiguous symbol
Error C2872: 'IXMLDOMNode' : ambiguous symbo
bobbeyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pgnatyukCommented:
Here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;316317

You will find this code:

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

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

Here is a solution from Microsoft:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;269194
bobbeyAuthor Commented:
pgnatyuk,
same thing here didnt work. I tried that earlier.
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

pgnatyukCommented:
So, maybe, you can add more details? It's a syntax error, so there is a line number. Can you show this line?
The reason, probably, is the same as in the previous case - your code 'sees' two different definitions for the same structure.
bobbeyAuthor Commented:
TestUtil.cpp

#import "../mssoap30.dll" named_guids \
      exclude("IStream", "IErrorInfo", "ISequentialStream", "_LARGE_INTEGER", \
  "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME")


using namespace MSSOAPLib30;

TestUtil.h

#import "msxml6.dll"  

public:
MSXML2::IXMLDOMNodePtr                        m_pRootReqeustNode;


Error


c:\lnb vs 2008\source\TestUitil.cpp(47) : error C2872: 'IXMLDOMNode' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(531) : IXMLDOMNode'
        or       'c:\lnb vs 2008\source\poupolicyutils\debug\msxml6.tlh(1693) : MSXML2::IXMLDOMNode'

c:\lnb vs 2008\source\TestUitil.cpp(47) : error C2872: 'IXMLDOMNode' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(531) : IXMLDOMNode'
        or       'c:\lnb vs 2008\source\poupolicyutils\debug\msxml6.tlh(1693) : MSXML2::IXMLDOMNode'

c:\lnb vs 2008\source\TestUitil.cpp(47) : error C2872: 'IXMLDOMNode' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(531) : IXMLDOMNode'
        or       'c:\lnb vs 2008\source\poupolicyutils\debug\msxml6.tlh(1693) : MSXML2::IXMLDOMNode'



c:\lnb vs 2008\source\TestUitil.cpp(47) : error C2872: 'IXMLDOMDocument' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(1399) : IXMLDOMDocument'
        or       'c:\lnb vs 2008\source\poupolicyutils\debug\msxml6.tlh(1976) : MSXML2::IXMLDOMDocument'
c:\lnb vs 2008\source\TestUitil.cpp(47) : error C2872: 'IXMLDOMDocument' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(1399) : IXMLDOMDocument'
        or       'c:\lnb vs 2008\source\poupolicyutils\debug\msxml6.tlh(1976) : MSXML2::IXMLDOMDocument'
c:\lnb vs 2008\source\TestUitil.cpp(47) : error C2872: 'IXMLDOMDocument' : ambiguous symbol
        could be 'c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(1399) : IXMLDOMDocumen


The error cursor pointing to  #import "msxml6.dll"  
pgnatyukCommented:
Can you add a full path for a test?
Do you see that you have msxml.h included twice?
Maybe comment this #import line or find another place where you included the same header?
Maybe switch to #inlcude instead of #import.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bobbeyAuthor Commented:
pgnatyuk,
In the middle I stopped this migration because of other high pripoty work. i will start  workining on next week. I will try to check the duplication as well the include the comment.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.