From: "Olivier F. R. Dierick" Subject: [2/2] psapi/tests: Add test for EnumProcessModules with NULL pointer and size > 0 Message-Id: <1435804865.27092.65.camel@piezo3.piezo-forte.be> Date: Thu, 02 Jul 2015 04:41:05 +0200 Adds a test for K32EnumProcessModules() with a NULL pointer and size > 0. On some Windows platforms psapi exports functions that are wrappers to K32* functions. On others the K32* functions are not available and the functions are implemented directly in psapi. Wine does the former. This test should work in both cases. --- dlls/psapi/tests/psapi_main.c | 5 +++++ 1 file changed, 5 insertions(+) -- Olivier F. R. Dierick o.dierick@piezo-forte.be From a11e513c28c60425cc7d1af1be805336d6bdbbbc Mon Sep 17 00:00:00 2001 From: "Olivier F. R. Dierick" Date: Thu, 2 Jul 2015 02:49:55 +0200 Subject: Test EnumProcessModules with NULL pointer and size > 0 --- dlls/psapi/tests/psapi_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index 890b4ac..cebfc5f 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -136,6 +136,11 @@ static void test_EnumProcessModules(void) ok(ret == 1, "failed with %d\n", GetLastError()); SetLastError(0xdeadbeef); + ret = pEnumProcessModules(hpQV, NULL, sizeof(HMODULE), &cbNeeded); + ok(!ret, "succeeded\n"); + ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); ret = pEnumProcessModules(hpQV, &hMod, sizeof(HMODULE), &cbNeeded); if(ret != 1) return; -- 1.7.10.4