CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Location
    Brussels
    Posts
    9

    Exclamation Failed to CreateInstance() - XML

    Hello,

    I make a setup project (C++) in .NET - OS WINNT.
    Project works in debug _and_ in install mode on my PC.

    Then I export this to another PC (OS WIN2000) to test the project, .NET framework installed.
    There it fails on pointer_to_XMLDOMDoc->CreateInstance(); with an error:
    ReadXMLDoc : Failed to instantiate an XML DOM document - Code = -2147221164

    The code reads as follows:
    IXMLDOMDocument2Ptr pXMLDom;
    HRESULT hRes;

    CoInitialize (NULL);

    hRes = pXMLDom.CreateInstance(__uuidof(DOMDocument40));

    if (FAILED(hRes)) {
    sprintf(szErr, "ReadXMLDoc : Failed to instantiate an XML DOM document - Code = %d\n", hRes);
    WriteXMLLog(szErr);
    }

    Strangely enough, it used to work on this PC, and now that it doesn't work anymore, I tested it on other PC's with WIN2000.
    No problem there.

    A search on the web gave me something about a bad install of a COM server.

    Has anyone any clue on this? It's pretty urgent, since this has to be shown to a customer tomorrow :-)

    Tnx a million!
    "The secret of life is honesty and fair dealing. If you can fake that, you've got it made - Groucho"

  2. #2
    Join Date
    Jun 2002
    Location
    Brussels
    Posts
    9
    OK, for anyone who might encounter this problem in the future:
    As expected it was probably an overwritten dll somewhere that caused this problem.

    After install of MDAC 2.7 (no change) I tried SOAP SP2.
    This solved the problem.

    X
    "The secret of life is honesty and fair dealing. If you can fake that, you've got it made - Groucho"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured