On 04.11.2015 11:13, Zhenbo Li wrote:
- hres = IXMLDOMDocument_loadXML(xmldoc, str, &vbool);
- if(FAILED(hres)) {
ERR("loadXML(%s) failed: %08x\n", debugstr_w(str), hres);
IXMLDOMDocument_Release(xmldoc);
SysFreeString(str);
return hres;
- }
This is not how it works. loadXML() returns S_FALSE on load failure as well, so you have to test strictly for S_OK, or check VARIANT_BOOL argument. You can probably add a test when invalid xml stream is received to see how _get_responseXML() behaves, e.g. does it return S_FALSE and a valid IDispatch or does it fail and return NULL.
Also I don't think it's a good idea to trace xml contents.