Discussion:
load() problem... please help...
(too old to reply)
Julius Mong
2006-03-17 08:43:18 UTC
Permalink
I'm doing the following in a unicode enabled .NET C++ project:


if ( ! FAILED ( pXMLReader.CreateInstance (
"Msxml2.DOMDocument.4.0" ) ) )
{

pXMLReader->validateOnParse = FALSE ;

pXMLReader->async = FALSE ;

_stprintf ( tmp , _T ( "%s\\%s.xml" ) , csCurrDir.GetString() ,
csTmpFile.GetString() ) ;

HRESULT hr = pXMLReader->load ( tmp ) ;

where csCurrDir is "D:\Temp", csTmpFile "091505-01" and tmp is a TCHAR*

What I do not understand is that when I run this, hr is always -1 even
thought the file IS there at the path, I have tried putting the file in
various places and even just putting "D:\\Temp\\091505-01.xml" in load() but
it never succeeds... so what I want to know is what am I doing wrong here?
Can anyone spot anything please?

Thanks,

Julius
Julius Mong
2006-03-17 08:51:51 UTC
Permalink
Seems that it returns -1 when it DOES find the file?!?!! Why is it so
strange...

Jules
Post by Julius Mong
if ( ! FAILED ( pXMLReader.CreateInstance (
"Msxml2.DOMDocument.4.0" ) ) )
{
pXMLReader->validateOnParse = FALSE ;
pXMLReader->async = FALSE ;
_stprintf ( tmp , _T ( "%s\\%s.xml" ) , csCurrDir.GetString() ,
csTmpFile.GetString() ) ;
HRESULT hr = pXMLReader->load ( tmp ) ;
where csCurrDir is "D:\Temp", csTmpFile "091505-01" and tmp is a TCHAR*
What I do not understand is that when I run this, hr is always -1 even
thought the file IS there at the path, I have tried putting the file in
various places and even just putting "D:\\Temp\\091505-01.xml" in load()
but it never succeeds... so what I want to know is what am I doing wrong
here? Can anyone spot anything please?
Thanks,
Julius
Loading...