From 89c5e30fd7536cd687e959d6ec8b57ba8d48b9c5 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Wed, 10 Jun 2009 07:07:51 +0000 Subject: [PATCH] - Fix ProcessPriorityClass case in NtQueryInformationProcess. Structure PROCESS_PRIORITY_CLASS should be returned. Tested in win vista svn path=/trunk/; revision=41365 --- reactos/ntoskrnl/ps/query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ps/query.c b/reactos/ntoskrnl/ps/query.c index df37a75c68f..e618e35ebfd 100644 --- a/reactos/ntoskrnl/ps/query.c +++ b/reactos/ntoskrnl/ps/query.c @@ -68,6 +68,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, PPROCESS_BASIC_INFORMATION ProcessBasicInfo = (PPROCESS_BASIC_INFORMATION)ProcessInformation; PKERNEL_USER_TIMES ProcessTime = (PKERNEL_USER_TIMES)ProcessInformation; + PPROCESS_PRIORITY_CLASS PsPriorityClass = (PPROCESS_PRIORITY_CLASS)ProcessInformation; ULONG HandleCount; PPROCESS_SESSION_INFORMATION SessionInfo = (PPROCESS_SESSION_INFORMATION)ProcessInformation; @@ -559,7 +560,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, case ProcessPriorityClass: /* Set the return length*/ - Length = sizeof(USHORT); + Length = sizeof(PROCESS_PRIORITY_CLASS); if (ProcessInformationLength != Length) { @@ -580,7 +581,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, _SEH2_TRY { /* Return current priority class */ - *(PUSHORT)ProcessInformation = Process->PriorityClass; + PsPriorityClass->PriorityClass = Process->PriorityClass; + PsPriorityClass->Foreground = FALSE; } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {