Alistair Leslie-Hughes : msxml3: Implement IXMLDOMDocument2 IPersistStream_Save.

Alexandre Julliard julliard at winehq.org
Thu Jan 22 08:41:56 CST 2009


Module: wine
Branch: master
Commit: d77acecbff1d27584a3988bad7c2e0224109d30b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d77acecbff1d27584a3988bad7c2e0224109d30b

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Jan 22 20:21:45 2009 +1100

msxml3: Implement IXMLDOMDocument2 IPersistStream_Save.

---

 dlls/msxml3/domdoc.c |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index a758d9f..49f18cc 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -357,8 +357,26 @@ static HRESULT WINAPI xmldoc_IPersistStream_Load(
 static HRESULT WINAPI xmldoc_IPersistStream_Save(
     IPersistStream *iface, LPSTREAM pStm, BOOL fClearDirty)
 {
-    FIXME("(%p, %p, %d): stub!\n", iface, pStm, fClearDirty);
-    return E_NOTIMPL;
+    domdoc *This = impl_from_IPersistStream(iface);
+    HRESULT hr;
+    BSTR xmlString;
+
+    TRACE("(%p, %p, %d)\n", iface, pStm, fClearDirty);
+
+    hr = IXMLDOMNode_get_xml( This->node, &xmlString );
+    if(hr == S_OK)
+    {
+        DWORD count;
+        DWORD len = strlenW(xmlString) * sizeof(WCHAR);
+
+        hr = IStream_Write( pStm, xmlString, len, &count );
+
+        SysFreeString(xmlString);
+    }
+
+    TRACE("ret 0x%08x\n", hr);
+
+    return hr;
 }
 
 static HRESULT WINAPI xmldoc_IPersistStream_GetSizeMax(




More information about the wine-cvs mailing list