user32: Return DMLERR_INVALIDPARAMETER if hszItem is NULL.

This commit is contained in:
James Hawkins 2007-10-12 00:20:08 -05:00 committed by Alexandre Julliard
parent ccabbeed60
commit 4fb3518e2a
2 changed files with 9 additions and 10 deletions

View File

@ -1141,8 +1141,13 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
pXAct = WDML_ClientQueueExecute(pConv, pData, cbData);
break;
case XTYP_POKE:
pXAct = WDML_ClientQueuePoke(pConv, pData, cbData, wFmt, hszItem);
break;
if (!hszItem)
{
pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
return 0;
}
pXAct = WDML_ClientQueuePoke(pConv, pData, cbData, wFmt, hszItem);
break;
case XTYP_ADVSTART|XTYPF_NODATA:
case XTYP_ADVSTART|XTYPF_NODATA|XTYPF_ACKREQ:
case XTYP_ADVSTART:

View File

@ -358,10 +358,7 @@ static void test_ddeml_client(void)
ret = DdeGetLastError(client_pid);
ok(op == NULL, "Expected NULL, got %p\n", op);
ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res);
todo_wine
{
ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
}
ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
/* XTYP_POKE, no data */
res = 0xdeadbeef;
@ -370,10 +367,7 @@ static void test_ddeml_client(void)
ret = DdeGetLastError(client_pid);
ok(op == NULL, "Expected NULL, got %p\n", op);
ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res);
todo_wine
{
ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
}
ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
/* XTYP_POKE, wrong size */
res = 0xdeadbeef;