MSXML: exception when running as service

Hello,
I have written a service program in C/C++ (Visual C++ 6), which should read XML files. I am using MSXML 4 to do this.
When I start the service as a console program, it can read the XML files with no problem.
When I start the service as a service, the load method throws an exception and the XML file is not read.
I tried to start the service with an Administrator user account, but with no effect.

What can be the reason ??

Code fragment:

::CoInitialize(NULL);
hr = CoCreateInstance(__uuidof(DOMDocument), NULL, CLSCTX_SERVER,
__uuidof(IXMLDOMDocument2), (LPVOID*)(&pIXMLDOMDocument2_Gl));

if(pIXMLDOMDocument2_Gl)
{
hr=pIXMLDOMDocument2_Gl->put_async (VARIANT_FALSE);
hr=pIXMLDOMDocument2_Gl->put_validateOnParse (VARIANT_FALSE);
hr=pIXMLDOMDocument2_Gl->put_resolveExternals(VARIANT_FALSE);

.........

try
{
hr = pIXMLDOMDocument2_Gl->load(_variant_t( strFilename ), &sResult);

if(SUCCEEDED(hr) && (sResult==VARIANT_TRUE))
{
// load ok, now read the XML attributes ...
}
else
{
// error during load
}
}
catch (...)
{
// exception occured !
}

Best Regards
Frank
[1495 byte] By [Leuband] at [2007-11-19 8:33:18]