Commit 331e1796 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Speed up a IPersistStreamInit::Save() by querying for BSTR length.

parent 94666ebf
......@@ -415,22 +415,20 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_Load(
}
static HRESULT WINAPI domdoc_IPersistStreamInit_Save(
IPersistStreamInit *iface, LPSTREAM pStm, BOOL fClearDirty)
IPersistStreamInit *iface, IStream *stream, BOOL clr_dirty)
{
domdoc *This = impl_from_IPersistStreamInit(iface);
HRESULT hr;
BSTR xmlString;
HRESULT hr;
TRACE("(%p)->(%p %d)\n", This, pStm, fClearDirty);
TRACE("(%p)->(%p %d)\n", This, stream, clr_dirty);
hr = IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), &xmlString );
if(hr == S_OK)
{
DWORD count;
DWORD len = strlenW(xmlString) * sizeof(WCHAR);
hr = IStream_Write( pStm, xmlString, len, &count );
DWORD len = SysStringLen(xmlString) * sizeof(WCHAR);
hr = IStream_Write( stream, xmlString, len, NULL );
SysFreeString(xmlString);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment