user32: Set uiLo and uiHi to zero on error.
This commit is contained in:
parent
1eaeb3e0cd
commit
2cd2f12256
|
@ -126,10 +126,10 @@ BOOL WINAPI UnpackDDElParam(UINT msg, LPARAM lParam,
|
|||
case WM_DDE_ADVISE:
|
||||
case WM_DDE_DATA:
|
||||
case WM_DDE_POKE:
|
||||
if (!lParam) return FALSE;
|
||||
if (!(params = GlobalLock( (HGLOBAL)lParam )))
|
||||
if (!lParam || !(params = GlobalLock((HGLOBAL)lParam)))
|
||||
{
|
||||
ERR("GlobalLock failed (%lx)\n", lParam);
|
||||
if (uiLo) *uiLo = 0;
|
||||
if (uiHi) *uiHi = 0;
|
||||
return FALSE;
|
||||
}
|
||||
TRACE("unpacked: low %08lx, high %08lx\n", params[0], params[1]);
|
||||
|
|
|
@ -710,21 +710,15 @@ static void test_UnpackDDElParam(void)
|
|||
hi = 0xbeef;
|
||||
ret = UnpackDDElParam(WM_DDE_ADVISE, (LPARAM)NULL, &lo, &hi);
|
||||
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
}
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
|
||||
lo = 0xdead;
|
||||
hi = 0xbeef;
|
||||
ret = UnpackDDElParam(WM_DDE_ADVISE, 0xcafebabe, &lo, &hi);
|
||||
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
}
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
|
||||
hglobal = GlobalAlloc(GMEM_DDESHARE, 2);
|
||||
ptr = GlobalLock(hglobal);
|
||||
|
@ -750,11 +744,8 @@ static void test_UnpackDDElParam(void)
|
|||
hi = 0xbeef;
|
||||
ret = UnpackDDElParam(WM_DDE_ACK, 0xcafebabe, &lo, &hi);
|
||||
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
}
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
|
||||
lo = 0xdead;
|
||||
hi = 0xbeef;
|
||||
|
@ -767,11 +758,8 @@ static void test_UnpackDDElParam(void)
|
|||
hi = 0xbeef;
|
||||
ret = UnpackDDElParam(WM_DDE_DATA, 0xcafebabe, &lo, &hi);
|
||||
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
}
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
|
||||
lo = 0xdead;
|
||||
hi = 0xbeef;
|
||||
|
@ -791,11 +779,8 @@ static void test_UnpackDDElParam(void)
|
|||
hi = 0xbeef;
|
||||
ret = UnpackDDElParam(WM_DDE_POKE, 0xcafebabe, &lo, &hi);
|
||||
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
}
|
||||
ok(lo == 0, "Expected 0, got %08lx\n", lo);
|
||||
ok(hi == 0, "Expected 0, got %08lx\n", hi);
|
||||
|
||||
lo = 0xdead;
|
||||
hi = 0xbeef;
|
||||
|
|
Loading…
Reference in New Issue