• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Problem with MSXML - Interface not registered...

A

Arif Ali Saiyed

Flightless Bird
Hi All,
I was using MSXML 6 to read an XML file ...which is on the
web..and things were working fine for me ....
after I uninstalled IE 8 and moved to IE6 .... It has stopped working
and I am getting and error

"Interface not registered"....


1) however the same program (same binary ) works fine on two more
friends of mine....

2) I Changed my default browser to Firefox that also did not help

3) I then also tried chanding path of XML.... i made it c:/
\xyz.xml ... and then it works ...
only when I make it http://processpriority.svn.sourceforge.net/viewvc/processpriority/pad_file.xml
it doesn't work ....

Any idea what's wrong ...below is the code snippet which was working
fine earlier and now it;s not working
However I am not too sure that IE degradation has caused this ... I am
just suspecting..



bool PMWXMLReaderCore::LoadXML(const wchar_t* srcFileName)
{
bool retVal = false;
m_hr = CoCreateInstance(CLSID_DOMDocument60,
NULL,
CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument3,
(void**)&m_PtrXMLDoc);

if (FAILED(m_hr))
{
PMWASSERT(false,"Failed to CoCreate an instance of an XML DOM\n");
cleanup();
return retVal;
}

m_hr = m_PtrXMLDoc->put_async(VARIANT_FALSE);
if (FAILED(m_hr))
{
PMWASSERT(false,"Failed to set async property\n");
cleanup();
return retVal;
}

m_hr = m_PtrXMLDoc->put_validateOnParse(VARIANT_FALSE);
if (FAILED(m_hr))
{
PMWASSERT(false,"Failed to set validateOnParse\n");
cleanup();
return retVal;
}

m_hr = m_PtrXMLDoc->put_resolveExternals(VARIANT_FALSE);
if (FAILED(m_hr))
{
PMWASSERT(false,"Failed to disable resolving externals.\n");
cleanup();
return retVal;
}

VariantInit(&m_vSrc);
V_BSTR(&m_vSrc) = SysAllocString(srcFileName);
V_VT(&m_vSrc) = VT_BSTR;

m_hr = m_PtrXMLDoc->load(m_vSrc, &m_status);

if(m_status!=VARIANT_TRUE)
{
m_hr = m_PtrXMLDoc->get_parseError(&m_PtrObjError);
m_hr = m_PtrObjError->get_reason(&m_bstr);
wchar_t errMessage[iConstMessageLength] = {0};
::pMWStringPrintf_W(errMessage,iConstMessageLength,L"could not read
[%s]\n error: %s ",srcFileName,m_bstr);
PMWASSERT(false,errMessage);
PMWLogger::Log(errMessage);
cleanup();
return retVal;
}

m_hr = m_PtrXMLDoc->get_xml(&m_bstr);
if (FAILED(m_hr))
{
PMWASSERT(false,"Failed to disable resolving externals.\n");
cleanup();
return retVal;
}
m_PtrXMLDoc->get_documentElement(&m_rootNode);
if(m_rootNode == NULL)
{
cleanup();
return retVal;
}
retVal = true;
return retVal;
}
 
Top