From 97dc03216183d803e73d30a8ad9d679c28f10c07 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Fri, 12 Oct 2007 00:14:34 -0500 Subject: [PATCH] user32: Return DMLERR_INVALIDPARAMETER if hszItem is NULL. --- dlls/user32/dde_client.c | 2 +- dlls/user32/tests/dde.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c index cb9fbc84ebb..78987c564d4 100644 --- a/dlls/user32/dde_client.c +++ b/dlls/user32/dde_client.c @@ -1163,7 +1163,7 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS pXAct = WDML_ClientQueueUnadvise(pConv, wFmt, hszItem); break; case XTYP_REQUEST: - if (pData) + if (pData || !hszItem) { pConv->instance->lastError = DMLERR_INVALIDPARAMETER; return 0; diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index cea7846d8e9..9755cf48d32 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -353,10 +353,7 @@ static void test_ddeml_client(void) ret = DdeGetLastError(client_pid); ok(hdata == NULL, "Expected NULL hdata, got %p\n", hdata); ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08x\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); DdeFreeStringHandle(client_pid, item);