sync msxml3 to wine 1.1.41

svn path=/trunk/; revision=46293
This commit is contained in:
Christoph von Wittich 2010-03-21 11:14:47 +00:00
parent 69ced963a6
commit 2daeb4ca5a

View file

@ -1650,19 +1650,20 @@ static HRESULT WINAPI domdoc_abort(
static BOOL bstr_to_utf8( BSTR bstr, char **pstr, int *plen ) static BOOL bstr_to_utf8( BSTR bstr, char **pstr, int *plen )
{ {
UINT len, blen = SysStringLen( bstr ); UINT len;
LPSTR str; LPSTR str;
len = WideCharToMultiByte( CP_UTF8, 0, bstr, blen, NULL, 0, NULL, NULL ); len = WideCharToMultiByte( CP_UTF8, 0, bstr, -1, NULL, 0, NULL, NULL );
str = heap_alloc( len ); str = heap_alloc( len );
if ( !str ) if ( !str )
return FALSE; return FALSE;
WideCharToMultiByte( CP_UTF8, 0, bstr, blen, str, len, NULL, NULL ); WideCharToMultiByte( CP_UTF8, 0, bstr, -1, str, len, NULL, NULL );
*plen = len; *plen = len;
*pstr = str; *pstr = str;
return TRUE; return TRUE;
} }
/* don't rely on data to be in BSTR format, treat it as WCHAR string */
static HRESULT WINAPI domdoc_loadXML( static HRESULT WINAPI domdoc_loadXML(
IXMLDOMDocument2 *iface, IXMLDOMDocument2 *iface,
BSTR bstrXML, BSTR bstrXML,