Vincent Povirk : ole32: Check the current storage for STGM_SIMPLE rather than ancestorStorage.

Alexandre Julliard julliard at winehq.org
Fri Dec 4 09:11:29 CST 2009


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Wed Dec  2 11:31:43 2009 -0600

ole32: Check the current storage for STGM_SIMPLE rather than ancestorStorage.

Since simple mode does not support substorages, we know these are the same.

---

 dlls/ole32/stg_stream.c |    4 ++--
 dlls/ole32/storage32.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c
index 332ee8a..60cbb88 100644
--- a/dlls/ole32/stg_stream.c
+++ b/dlls/ole32/stg_stream.c
@@ -575,7 +575,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
   }
 
   /* In simple mode keep the stream size above the small block limit */
-  if (This->parentStorage->ancestorStorage->base.openFlags & STGM_SIMPLE)
+  if (This->parentStorage->openFlags & STGM_SIMPLE)
     libNewSize.u.LowPart = max(libNewSize.u.LowPart, LIMIT_TO_USE_SMALL_BLOCK);
 
   if (This->streamSize.u.LowPart == libNewSize.u.LowPart)
@@ -868,7 +868,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
     pstatstg->grfMode = This->grfMode;
 
     /* In simple create mode cbSize is the current pos */
-    if((root->base.openFlags & STGM_SIMPLE) && root->create)
+    if((This->parentStorage->openFlags & STGM_SIMPLE) && root->create)
       pstatstg->cbSize = This->currentPosition;
 
     return S_OK;
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 3991b9e..e7a8c73 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -866,7 +866,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
       return STG_E_ACCESSDENIED;
   }
 
-  if(This->ancestorStorage->base.openFlags & STGM_SIMPLE)
+  if(This->openFlags & STGM_SIMPLE)
     if(grfMode & STGM_CREATE) return STG_E_INVALIDFLAG;
 
   *ppstm = 0;




More information about the wine-cvs mailing list