On 5/17/2012 11:46, Stefan Leichter wrote:
> SetLastError(0xdeadbeef);
> + pEnumProcessModules(hpQI,&hMod, sizeof(HMODULE), NULL);
> + 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());
> +
Why don't you check return value from the first call?