Twain
05-02-2005, 07:59 AM
Does anyone know if there are restrictions on using MSXML and the IXMLDOMDocument functions load() and save()? Specifically,
I have code that works on documents located in RAM, but as soon as I try to load from or save to a compact flash card or a
mini-SD card, the application hangs. I am running the code on a HP hx4700. A code snippet follows. The function FileLoad
input argument "path" contains the string: "CF Card\My Documents\File II\file.xml"
------------ CODE SNIPPET ----------------------------
bool FileLoad( const TCHAR *path )
{
CComVariant xmlFile( path );
CComPtr<IXMLDOMDocument> xmlDoc;
HRESULT hr;
VARIANT_BOOL success;
hr = xmlDoc.CoCreateInstance( CLSID_DOMDocument );
if ( FAILED( hr ) )
return( false );
hr = xmlDoc->put_async( VARIANT_FALSE );
hr = xmlDoc->load( xmlFile ,&success );
if ( hr == S_FALSE )
return( false );
o
o
o
}
I have code that works on documents located in RAM, but as soon as I try to load from or save to a compact flash card or a
mini-SD card, the application hangs. I am running the code on a HP hx4700. A code snippet follows. The function FileLoad
input argument "path" contains the string: "CF Card\My Documents\File II\file.xml"
------------ CODE SNIPPET ----------------------------
bool FileLoad( const TCHAR *path )
{
CComVariant xmlFile( path );
CComPtr<IXMLDOMDocument> xmlDoc;
HRESULT hr;
VARIANT_BOOL success;
hr = xmlDoc.CoCreateInstance( CLSID_DOMDocument );
if ( FAILED( hr ) )
return( false );
hr = xmlDoc->put_async( VARIANT_FALSE );
hr = xmlDoc->load( xmlFile ,&success );
if ( hr == S_FALSE )
return( false );
o
o
o
}