mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- Set priority only if PriorityClass != PROCESS_PRIORITY_CLASS_INVALID
svn path=/trunk/; revision=41367
This commit is contained in:
parent
0c2ae3d768
commit
0d96a60df3
1 changed files with 12 additions and 9 deletions
|
@ -1179,16 +1179,19 @@ GetAppName:
|
|||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Set new class */
|
||||
Status = NtSetInformationProcess(hProcess,
|
||||
ProcessPriorityClass,
|
||||
&PriorityClass,
|
||||
sizeof(PROCESS_PRIORITY_CLASS));
|
||||
if(!NT_SUCCESS(Status))
|
||||
if (PriorityClass.PriorityClass != PROCESS_PRIORITY_CLASS_INVALID)
|
||||
{
|
||||
DPRINT1("Unable to set new process priority, status 0x%x\n", Status);
|
||||
SetLastErrorByStatus(Status);
|
||||
goto Cleanup;
|
||||
/* Set new class */
|
||||
Status = NtSetInformationProcess(hProcess,
|
||||
ProcessPriorityClass,
|
||||
&PriorityClass,
|
||||
sizeof(PROCESS_PRIORITY_CLASS));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Unable to set new process priority, status 0x%x\n", Status);
|
||||
SetLastErrorByStatus(Status);
|
||||
goto Cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set Error Mode */
|
||||
|
|
Loading…
Reference in a new issue