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

This commit is contained in:
Rob Shearman 2006-12-17 23:48:25 +00:00 committed by Alexandre Julliard
parent fda6498284
commit fb883d8687
2 changed files with 1 additions and 3 deletions

View File

@ -426,7 +426,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_SetSize(
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;

View File

@ -79,9 +79,7 @@ static void test_streamonhglobal(IStream *pStream)
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)