psapi/tests: Added tests for EnumProcessModules with last parameter NULL.
This commit is contained in:
parent
c0e72bb362
commit
0773ed8d27
|
@ -116,6 +116,16 @@ static void test_EnumProcessModules(void)
|
||||||
pEnumProcessModules(hpQI, NULL, 0, &cbNeeded);
|
pEnumProcessModules(hpQI, NULL, 0, &cbNeeded);
|
||||||
ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError());
|
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);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pEnumProcessModules(hpQV, NULL, 0, &cbNeeded);
|
ret = pEnumProcessModules(hpQV, NULL, 0, &cbNeeded);
|
||||||
ok(ret == 1, "failed with %d\n", GetLastError());
|
ok(ret == 1, "failed with %d\n", GetLastError());
|
||||||
|
|
Loading…
Reference in New Issue