...
{
//
// Failed to parse stream, output error information.
//
IXMLError *pXMLError = NULL ;
XML_ERROR xmle;
hr = pDoc->QueryInterface(IID_IXMLError, (void **)&pXMLError);
CHECK_ERROR(SUCCEEDED(hr), "Couldn't get IXMLError");
ASSERT(pXMLError);
hr = pXMLError->GetErrorInfo(&xmle);
SAFERELEASE(pXMLError);
CHECK_ERROR(SUCCEEDED(hr), "GetErrorInfo Failed");
printf("%s: Error on line %d. Found %S while expecting %S\r\n",
argv[0],
xmle._nLine,
xmle._pszFound,
xmle._pszExpected);
SysFreeString(xmle._pszFound);
SysFreeString(xmle._pszExpected);
SysFreeString(xmle._pchBuf);
}
...
I get stuck when trying to call the QueryInteface method as I cannot get
the IID_IXMLError GUID. Is there anyone out there who has an idea how
could it be done from Delphi? Also, could somebody from Microsoft
comment on why is the extraction of the error informaton made this
comlicated ?
Patrik Muzila
Allaire Corp.