Microsoft KB Archive/301630

= FIX: IXMLDOMDocument::load &quot;Hangs&quot; MIPS Device When Called from C++ =

PSS ID Number: 301630

Article Last Modified on 10/2/2003

-

The information in this article applies to:


 * Microsoft Windows CE Platform SDK for Pocket PC

-



This article was previously published under Q301630



SYMPTOMS
Calls to methods of the MSXML component may cause MIPS-based Pocket PC devices to stop responding (&quot;hang&quot;).



CAUSE
The operating system incorrectly handles the internal exceptions that are used to communicate XML processing errors. The following are examples of when this may occur:  The interface being called has not been marked for unsafe execution through IObjectSafety. The document specified in a call to IXMLDOMDocument::load does not exist.



RESOLUTION
You can use the following to work around the causes listed above, respectively.  Query IObjectSafety for the desired interface and disable all safe execution options. See the following Microsoft Knowledge Base article for details on how to mark an XML interface for unsafe execution:

301586 BUG: IXMLDOMDocument::load Method Returns Error 0x80070005 - E_ACCESSDENIED

 Do not specify a document resource that does not exist in calls to IXMLDOMDocument::load. If it is necessary to use locators for nonexistent resources, implement a custom IStream interface that returns an empty document for documents that do not exist.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This problem was corrected in Service Pack 1 for the Pocket PC. Contact the manufacturer of your device to get the latest firmware updates for your device.

<div class="moreinformation_section">

MORE INFORMATION
The following code fragment demonstrates how to reproduce this problem: IXMLDOMDocument* pDoc; VARIANT_BOOL    vSuccess = VARIANT_FALSE; VARIANT         vSource;

CoCreateInstance( CLSID_DOMDocument,                      0,                       CLSCTX_INPROC_SERVER,                       IID_IXMLDOMDocument,                       (void**)&pDoc );

VariantInit( &vSource ); vSource.bstrVal = SysAllocString(L&quot;wehavenobananas&quot;); vSource.vt = VT_BSTR;<BR/>

pDoc->load( vSource, &vSuccess ); // Device or process will hang here.

<div class="references_section">