Julius Mong
2006-03-17 08:43:18 UTC
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
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