Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


MSXML4 + get_item

From: "Gerhard Fischer" <xxxx@----------.-->
To: NULL
Date: 7/2/2004 8:08:00 AM
Hello,

we areworking with MSXML4  and VC6. Now we have problems with following
code:

IXMLDOMNodeList *pIDOMNodeList = NULL;
 IXMLDOMNode *pIDOMNode = NULL;
 long value;
 BSTR bstrItemText;


   CString csX;

 hr= pXMLDom.CreateInstance(__uuidof(DOMDocument40));
 if (FAILED(hr))
  {
  ::MessageBox( NULL, "Failed to instantiate an XML DOM
(Automatikeinstellungen)",
      "Error", MB_ICONERROR + MB_OK );
  exit (EXIT_FAILURE);
  }

 pXMLDom->async = VARIANT_FALSE; // default - true,
 pXMLDom->resolveExternals = VARIANT_FALSE;

 if(pXMLDom->load((LPCTSTR)m_csXMLAutomatikeinstellungen)!=VARIANT_TRUE)
  {
  csX.Format ("Failed to load stocks.xml:\n%s\n",
(LPCSTR)pXMLDom->parseError->Getreason());
  ::MessageBox( NULL, csX,
      "Error", MB_ICONERROR + MB_OK );
  exit (EXIT_FAILURE);
  }

 pIDOMNodeList = pXMLDom->getElementsByTagName("Pruefstand");
 hr = pIDOMNodeList->get_length(&value);
 if(SUCCEEDED(hr))
  {
  pIDOMNodeList->reset();
  for(int ii = 0; ii < value; ii++)
   {
   pIDOMNodeList->get_item(ii, &pIDOMNode);
        ............



At the point where I call "get_item", I get  an access violation
(Unbehandelte Ausnahme in
Proj0001.exe (MSXML4.DLL): 0xC0000005: Access Violation).
The "...->get_length" is working correctly.

What`s wrong ?


Gerhard





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent