kernel32/tests: Use THREAD_ALL_ACCESS definition compatible with versions of Windows before Vista.
This commit is contained in:
parent
448d7770dc
commit
cdc306651c
|
@ -35,6 +35,9 @@
|
||||||
#include <winnls.h>
|
#include <winnls.h>
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
/* THREAD_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
|
||||||
|
#define THREAD_ALL_ACCESS_NT4 (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3ff)
|
||||||
|
|
||||||
/* Specify the number of simultaneous threads to test */
|
/* Specify the number of simultaneous threads to test */
|
||||||
#define NUM_THREADS 4
|
#define NUM_THREADS 4
|
||||||
/* Specify whether to test the extended priorities for Win2k/XP */
|
/* Specify whether to test the extended priorities for Win2k/XP */
|
||||||
|
@ -565,7 +568,7 @@ static VOID test_SuspendThread(void)
|
||||||
ok(error==1,"SuspendThread did not work\n");
|
ok(error==1,"SuspendThread did not work\n");
|
||||||
/* check that access restrictions are obeyed */
|
/* check that access restrictions are obeyed */
|
||||||
if (pOpenThread) {
|
if (pOpenThread) {
|
||||||
access_thread=pOpenThread(THREAD_ALL_ACCESS & (~THREAD_SUSPEND_RESUME),
|
access_thread=pOpenThread(THREAD_ALL_ACCESS_NT4 & (~THREAD_SUSPEND_RESUME),
|
||||||
0,threadId);
|
0,threadId);
|
||||||
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
||||||
if (access_thread!=NULL) {
|
if (access_thread!=NULL) {
|
||||||
|
@ -610,7 +613,7 @@ static VOID test_TerminateThread(void)
|
||||||
"TerminateThread didn't work\n");
|
"TerminateThread didn't work\n");
|
||||||
/* check that access restrictions are obeyed */
|
/* check that access restrictions are obeyed */
|
||||||
if (pOpenThread) {
|
if (pOpenThread) {
|
||||||
access_thread=pOpenThread(THREAD_ALL_ACCESS & (~THREAD_TERMINATE),
|
access_thread=pOpenThread(THREAD_ALL_ACCESS_NT4 & (~THREAD_TERMINATE),
|
||||||
0,threadId);
|
0,threadId);
|
||||||
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
||||||
if (access_thread!=NULL) {
|
if (access_thread!=NULL) {
|
||||||
|
@ -679,7 +682,7 @@ static VOID test_thread_priority(void)
|
||||||
|
|
||||||
if (pOpenThread) {
|
if (pOpenThread) {
|
||||||
/* check that access control is obeyed */
|
/* check that access control is obeyed */
|
||||||
access_thread=pOpenThread(THREAD_ALL_ACCESS &
|
access_thread=pOpenThread(THREAD_ALL_ACCESS_NT4 &
|
||||||
(~THREAD_QUERY_INFORMATION) & (~THREAD_SET_INFORMATION),
|
(~THREAD_QUERY_INFORMATION) & (~THREAD_SET_INFORMATION),
|
||||||
0,curthreadId);
|
0,curthreadId);
|
||||||
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
||||||
|
@ -751,7 +754,7 @@ static VOID test_thread_priority(void)
|
||||||
|
|
||||||
if (pOpenThread) {
|
if (pOpenThread) {
|
||||||
/* check that access control is obeyed */
|
/* check that access control is obeyed */
|
||||||
access_thread=pOpenThread(THREAD_ALL_ACCESS &
|
access_thread=pOpenThread(THREAD_ALL_ACCESS_NT4 &
|
||||||
(~THREAD_QUERY_INFORMATION) & (~THREAD_SET_INFORMATION),
|
(~THREAD_QUERY_INFORMATION) & (~THREAD_SET_INFORMATION),
|
||||||
0,curthreadId);
|
0,curthreadId);
|
||||||
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
|
||||||
|
@ -791,7 +794,7 @@ static VOID test_GetThreadTimes(void)
|
||||||
ok(thread!=NULL,"Create Thread failed\n");
|
ok(thread!=NULL,"Create Thread failed\n");
|
||||||
/* check that access control is obeyed */
|
/* check that access control is obeyed */
|
||||||
if (pOpenThread) {
|
if (pOpenThread) {
|
||||||
access_thread=pOpenThread(THREAD_ALL_ACCESS &
|
access_thread=pOpenThread(THREAD_ALL_ACCESS_NT4 &
|
||||||
(~THREAD_QUERY_INFORMATION), 0,threadId);
|
(~THREAD_QUERY_INFORMATION), 0,threadId);
|
||||||
ok(access_thread!=NULL,
|
ok(access_thread!=NULL,
|
||||||
"OpenThread returned an invalid handle\n");
|
"OpenThread returned an invalid handle\n");
|
||||||
|
|
Loading…
Reference in New Issue