Module: wine Branch: master Commit: 9effcc98f9c3259b615685088588b04d14589fe9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9effcc98f9c3259b6156850885...
Author: Olivier F. R. Dierick o.dierick@piezo-forte.be Date: Thu Jul 2 04:41:05 2015 +0200
psapi/tests: Add test for EnumProcessModules with NULL pointer.
---
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;