[PATCH 6/6] ole32: Allow SetSize to move a fixed memory block.
From: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/ole32/hglobalstream.c | 2 +- dlls/ole32/tests/hglobalstream.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index ee345f6293a..4590bb9c431 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c @@ -426,7 +426,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_SetSize( /* * Re allocate the HGlobal to fit the new size of the stream. */ - supportHandle = GlobalReAlloc(This->handle->hglobal, libNewSize.u.LowPart, 0); + supportHandle = GlobalReAlloc(This->handle->hglobal, libNewSize.u.LowPart, GMEM_MOVEABLE); if (supportHandle == 0) return E_OUTOFMEMORY; diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c index 87c502dc2f4..2f386914afc 100644 --- a/dlls/ole32/tests/hglobalstream.c +++ b/dlls/ole32/tests/hglobalstream.c @@ -625,20 +625,16 @@ static void test_IStream_Clone(void) newsize.QuadPart = 0x8000; hr = IStream_SetSize(stream, newsize); -todo_wine ok(hr == S_OK, "unexpected %#x\n", hr); stream_info(stream, &hmem, &size, &pos); ok(hmem != 0, "unexpected %p\n", hmem); -todo_wine ok(hmem != orig_hmem, "unexpected %p\n", hmem); -todo_wine ok(size == 0x8000, "unexpected %#x\n", size); ok(pos == 0, "unexpected %d\n", pos); stream_info(clone, &hmem_clone, &size, &pos); ok(hmem_clone == hmem, "handles should match\n"); -todo_wine ok(size == 0x8000, "unexpected %#x\n", size); ok(pos == 0, "unexpected %d\n", pos); -- 2.23.0
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76855 Your paranoid android. === debiant (32 bit Chinese:China report) === ole32: clipboard.c:1745: Test failed: got 800401d0 clipboard.c:1748: Test failed: called 4 clipboard.c:1757: Test failed: got 800401d0 clipboard.c:1760: Test failed: called 4 clipboard.c:1761: Test failed: called 1 clipboard.c:1770: Test failed: called 6 clipboard.c:1780: Test failed: called 7 clipboard.c:1792: Test failed: called 9 clipboard.c:1802: Test failed: called 10 clipboard.c:1812: Test failed: called 11 === debiant (64 bit WoW report) === ole32: clipboard.c:993: Test failed: OpenClipboard failed clipboard.c:995: Test failed: got 00000000 clipboard.c:997: Test failed: got fixed block 00000000 / 00000000 clipboard.c:999: Test failed: CloseClipboard failed clipboard.c:864: Test failed: didn't find cf_dataobject clipboard.c:865: Test failed: didn't find cf_ole_priv_data
participants (2)
-
Huw Davies -
Marvin