Huw Davies : ole32: Call the object's IPersistStorage_Save() if the object is running.

Alexandre Julliard julliard at winehq.org
Tue Oct 21 07:07:05 CDT 2008


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Mon Oct 20 15:37:38 2008 +0100

ole32: Call the object's IPersistStorage_Save() if the object is running.

---

 dlls/ole32/defaulthandler.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index f300330..7a851ca 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -1572,11 +1572,18 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_Load(
 static HRESULT WINAPI DefaultHandler_IPersistStorage_Save(
            IPersistStorage*     iface,
            IStorage*            pStgSave,
-           BOOL                 fSaveAsLoad)
+           BOOL                 fSameAsLoad)
 {
-  DefaultHandler *This = impl_from_IPersistStorage(iface);
+    DefaultHandler *This = impl_from_IPersistStorage(iface);
+    HRESULT hr;
+
+    TRACE("(%p)->(%p, %d)\n", iface, pStgSave, fSameAsLoad);
 
-  return IPersistStorage_Save(This->dataCache_PersistStg, pStgSave, fSaveAsLoad);
+    hr = IPersistStorage_Save(This->dataCache_PersistStg, pStgSave, fSameAsLoad);
+    if(SUCCEEDED(hr) && object_is_running(This))
+        hr = IPersistStorage_Save(This->pPSDelegate, pStgSave, fSameAsLoad);
+
+    return hr;
 }
 
 




More information about the wine-cvs mailing list