Hi Hans,
hr = IXMLDOMNode_get_text( node, &s ); IXMLDOMNode_Release( node ); - if (!strcmpW( s, product_code )) r = ERROR_SUCCESS; - SysFreeString(s); + if (hr == S_OK && !strcmpW( s, product_code )) r = ERROR_SUCCESS; + SysFreeString( s );
Is it really safe to free s if IXMLDOMNode_get_text failed? --Juan