 |
 |
 |
Hi,
I have written an application in Microsoft Visual C++ (Visual Studio
6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it
throws an E_ACCESSDENIED (HRESULT = 0x80070005) exceptioon. I am not
sure why this is happenning. The sample code is:
IXMLDOMDocument2Ptr spXMLDocument;
spXMLDocument.CreateInstance(CLSID_DOMDocument40);
try
{
VARIANT vSourceFile;
VariantInit(&vSourceFile);
vSourceFile.vt = VT_BSTR;
vSourceFile.bstrVal = _bstr_t("C:\\Data.xml");
VARIANT_BOOL vbReturnCode = VARIANT_FALSE;
vbReturnCode = spXMLDocument->load(vSourceFile); //This is
the line that throws the exception.
}
catch(_comk_error &e)
{
AfxMessageBox(e.Description());
}
If I replace the load method with the loadXML method and pass the XML
as a string, it works fine.
I am trying to run this program on a machine with a French version of
WinXP. I tried to use MSXML 6.0 in stead of MSXML 4 and that seems to
have solved the problem. The thing is that we do not want to recompile
and re-release the program with MSXML 6. I am not sure why this fails
with MSXML 4.0.
I have a feeling that this has something to do with access rights but I
could be wrong.
Another problem on the same machine is that IE cannot display the XML
(even though it is well-formed). IE gives a message "XML page cannot be
displayed.......class not registered". I am not sure if these two
problems are related.
Any feedback would be appreciated.
Regards.
|
 | 

|  |
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.
|  |
| |
 |
 |
 |