We help IT Professionals succeed at work.

IXMLDOMDocumentPtr load method problem

chandas
chandas asked
on
Hi guys, I have the following code in a sample project.

//////////////////////etc
HRESULT hr = domPtr.CreateInstance(_T("msxml2.domdocument"));    
         
          VARIANT_BOOL succ, asyncTRUE;
          asyncTRUE = false;
          _variant_t fl = _T("myFile.xml");

          hr = domPtr->put_async(asyncTRUE);
         
          hr = domPtr->load(fl, &succ);
///////////////////etc

(All my HRESULTS return success by the way)
why is it that domPtr->load(fl, &succ) always gives succ as -1???

I guess this indicates an error but I don't see why.

Regards

Senkwe
Comment
Watch Question

Commented:
suuc is a Boolean (VARIANT_BOOL) value.
TRUE = -1
FALSE = 0

So -1 means success !

Explore More ContentExplore courses, solutions, and other research materials related to this topic.