Author: dchapyshev
Date: Wed Jun 10 11:07:51 2009
New Revision: 41365
URL:
http://svn.reactos.org/svn/reactos?rev=41365&view=rev
Log:
- Fix ProcessPriorityClass case in NtQueryInformationProcess. Structure
PROCESS_PRIORITY_CLASS should be returned. Tested in win vista
Modified:
trunk/reactos/ntoskrnl/ps/query.c
Modified: trunk/reactos/ntoskrnl/ps/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=41…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Wed Jun 10 11:07:51 2009
@@ -68,6 +68,7 @@
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 @@
case ProcessPriorityClass:
/* Set the return length*/
- Length = sizeof(USHORT);
+ Length = sizeof(PROCESS_PRIORITY_CLASS);
if (ProcessInformationLength != Length)
{
@@ -580,7 +581,8 @@
_SEH2_TRY
{
/* Return current priority class */
- *(PUSHORT)ProcessInformation = Process->PriorityClass;
+ PsPriorityClass->PriorityClass = Process->PriorityClass;
+ PsPriorityClass->Foreground = FALSE;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{