psapi/tests: Added tests for EnumProcessModules with last parameter NULL.

This commit is contained in:
Stefan Leichter 2012-06-21 23:11:22 +02:00 committed by Alexandre Julliard
parent c0e72bb362
commit 0773ed8d27
1 changed files with 10 additions and 0 deletions

View File

@ -116,6 +116,16 @@ static void test_EnumProcessModules(void)
pEnumProcessModules(hpQI, NULL, 0, &cbNeeded);
ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pEnumProcessModules(hpQI, &hMod, sizeof(HMODULE), NULL);
ok(!ret, "succeeded\n");
ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pEnumProcessModules(hpQV, &hMod, sizeof(HMODULE), NULL);
ok(!ret, "succeeded\n");
ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pEnumProcessModules(hpQV, NULL, 0, &cbNeeded);
ok(ret == 1, "failed with %d\n", GetLastError());