[ros-diffs] [dchapyshev] 41365: - Fix ProcessPriorityClass case in NtQueryInformationProcess. Structure PROCESS_PRIORITY_CLASS should be returned. Tested in win vista

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Wed Jun 10 09:07:52 CEST 2009


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=41365&r1=41364&r2=41365&view=diff
==============================================================================
--- 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)
             {



More information about the Ros-diffs mailing list