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

This commit is contained in:
Dmitry Timoshkov 2014-02-07 23:08:57 +09:00 committed by Alexandre Julliard
parent cdc306651c
commit 52bc06af7b
1 changed files with 6 additions and 3 deletions

View File

@ -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);