psapi/tests: Add test for EnumProcessModules with NULL pointer.

This commit is contained in:
Olivier F. R. Dierick 2015-07-02 04:41:05 +02:00 committed by Alexandre Julliard
parent c3f95eddc1
commit 9effcc98f9
1 changed files with 5 additions and 0 deletions

View File

@ -135,6 +135,11 @@ static void test_EnumProcessModules(void)
ret = pEnumProcessModules(hpQV, NULL, 0, &cbNeeded);
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)