Nikolay Sivov : msxml3: Actually try to use IPersistStream if it' s available.

Alexandre Julliard julliard at winehq.org
Thu Oct 28 12:19:52 CDT 2010


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Oct 28 01:27:06 2010 +0400

msxml3: Actually try to use IPersistStream if it's available.

---

 dlls/msxml3/saxreader.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index a0c821e..5f04227 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -2043,12 +2043,24 @@ static HRESULT internal_parse(
                 SysFreeString(bstrData);
                 break;
             }
+
             if(IUnknown_QueryInterface(V_UNKNOWN(&varInput),
                         &IID_IPersistStream, (void**)&persistStream) == S_OK)
             {
+                hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
+                if(hr != S_OK)
+                {
+                    IPersistStream_Release(persistStream);
+                    return hr;
+                }
+
                 hr = IPersistStream_Save(persistStream, stream, TRUE);
                 IPersistStream_Release(persistStream);
-                if(hr != S_OK) break;
+                if(hr != S_OK)
+                {
+                    IStream_Release(stream);
+                    break;
+                }
             }
             if(stream || IUnknown_QueryInterface(V_UNKNOWN(&varInput),
                         &IID_IStream, (void**)&stream) == S_OK)




More information about the wine-cvs mailing list