Commit 52bc06af authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32/tests: Use PROCESS_ALL_ACCESS definition compatible with versions of Windows before Vista.

parent cdc30665
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment