Nikolay Sivov : msxml3: Speed up a IPersistStreamInit::Save() by querying for BSTR length.
Alexandre Julliard
julliard at winehq.org
Mon Jul 19 11:05:42 CDT 2010
Module: wine
Branch: master
Commit: 331e179632b0519451d25dc02729a2e9fc2713d6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=331e179632b0519451d25dc02729a2e9fc2713d6
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jul 18 17:18:13 2010 +0400
msxml3: Speed up a IPersistStreamInit::Save() by querying for BSTR length.
---
dlls/msxml3/domdoc.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 0007503..f9f02e0 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -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);
}
More information about the wine-cvs
mailing list