diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 67d838a110..5173e91d2f 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,9 @@ #include "wine/test.h" #include "delayloadhandler.h" +/* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */ +#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000) + #define ALIGN_SIZE(size, alignment) (((size) + (alignment - 1)) & ~((alignment - 1))) struct PROCESS_BASIC_INFORMATION_PRIVATE @@ -1436,7 +1439,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) } SetLastError(0xdeadbeef); - process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, GetCurrentProcessId()); + process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, GetCurrentProcessId()); ok(process != NULL, "OpenProcess error %d\n", GetLastError()); noop_thread_started = 0; @@ -1659,7 +1662,7 @@ static void child_process(const char *dll_name, DWORD target_offset) ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); SetLastError(0xdeadbeef); - process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, GetCurrentProcessId()); + process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, GetCurrentProcessId()); ok(process != NULL, "OpenProcess error %d\n", GetLastError()); SetLastError(0xdeadbeef); @@ -2186,7 +2189,7 @@ static void test_ExitProcess(void) ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %x\n", ret); SetLastError(0xdeadbeef); - process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pi.dwProcessId); + process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, pi.dwProcessId); ok(process != NULL, "OpenProcess error %d\n", GetLastError()); CloseHandle(process);