mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 06:00:45 +00:00
msxml3: Speed up a IPersistStreamInit::Save() by querying for BSTR length.
This commit is contained in:
parent
94666ebf0d
commit
331e179632
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user