Rob Shearman : ole32: Fix SetSize for HGLOBAL streams in the case of being out-of-memory.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 18 05:34:33 CST 2006


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Dec 17 23:48:25 2006 +0000

ole32: Fix SetSize for HGLOBAL streams in the case of being out-of-memory.

---

 dlls/ole32/hglobalstream.c       |    2 +-
 dlls/ole32/tests/hglobalstream.c |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c
index 0b7f2ef..99669d3 100644
--- a/dlls/ole32/hglobalstream.c
+++ b/dlls/ole32/hglobalstream.c
@@ -426,7 +426,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_
   supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0);
 
   if (supportHandle == 0)
-    return STG_E_MEDIUMFULL;
+    return E_OUTOFMEMORY;
 
   This->supportHandle = supportHandle;
   This->streamSize.u.LowPart = libNewSize.u.LowPart;
diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c
index 4fc6ef9..c6eaa19 100644
--- a/dlls/ole32/tests/hglobalstream.c
+++ b/dlls/ole32/tests/hglobalstream.c
@@ -79,9 +79,7 @@ static void test_streamonhglobal(IStream
     ull.u.HighPart = -1;
     ull.u.LowPart = -1;
     hr = IStream_SetSize(pStream, ull);
-    todo_wine {
     ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr);
-    }
 }
 
 START_TEST(hglobalstream)




More information about the wine-cvs mailing list