Commit 72a3f183 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

kernel32: Return TRUE for all pointer params in GlobalUnlock.

parent 40dff81b
......@@ -480,7 +480,7 @@ BOOL WINAPI GlobalUnlock(HGLOBAL hmem)
PGLOBAL32_INTERN pintern;
BOOL locked;
if (ISPOINTER(hmem)) return FALSE;
if (ISPOINTER(hmem)) return TRUE;
RtlLockHeap(GetProcessHeap());
__TRY
......
......@@ -189,6 +189,14 @@ START_TEST(heap)
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
gbl = GlobalAlloc(GMEM_DDESHARE, 100);
res = GlobalUnlock(gbl);
ok(res == 1, "Expected 1, got %d\n", res);
res = GlobalUnlock(gbl);
ok(res == 1, "Expected 1, got %d\n", res);
/* ####################################### */
/* Local*() functions */
gbl = LocalAlloc(LMEM_MOVEABLE, 0);
......
......@@ -492,10 +492,7 @@ static void test_PackDDElParam(void)
ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam);
todo_wine
{
ok(ret == 1, "Expected 1, got %d\n", ret);
}
ok(ret == 1, "Expected 1, got %d\n", ret);
lo = hi = 0;
ret = UnpackDDElParam(WM_DDE_ADVISE, lparam, &lo, &hi);
......@@ -534,10 +531,7 @@ static void test_PackDDElParam(void)
ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam);
todo_wine
{
ok(ret == 1, "Expected 1, got %d\n", ret);
}
ok(ret == 1, "Expected 1, got %d\n", ret);
lo = hi = 0;
ret = UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi);
......@@ -560,10 +554,7 @@ static void test_PackDDElParam(void)
ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam);
todo_wine
{
ok(ret == 1, "Expected 1, got %d\n", ret);
}
ok(ret == 1, "Expected 1, got %d\n", ret);
lo = hi = 0;
ret = UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi);
......@@ -602,10 +593,7 @@ static void test_PackDDElParam(void)
ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
ret = GlobalUnlock((HGLOBAL)lparam);
todo_wine
{
ok(ret == 1, "Expected 1, got %d\n", ret);
}
ok(ret == 1, "Expected 1, got %d\n", ret);
lo = hi = 0;
ret = UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment