[Autogenerated] here are the main priority related APIs in user
mode we have the set priority class that changes the process
priority class one of the six possible values.
And of course if the process,
the target process not running with the main privilege is a
real time value will change too high.
Only be applied as high for a particular threat.
We can call the set threat priority function to change the
base priority of the thread around somewhere around the
base priority of the process.
Of course.
So the second parameter there is going to be
enumeration rather than an absolute value.
We have seven levels for all priority classes except real
time that allows any priority from 16 to 31.
In fact in kernel mode things are simpler in most respects
because we can just set the priority of a threat directly
by using an absolute value.
Case set priority threat changes the dynamic priority over thread.
And this works by providing a kernel object.
The thread, kernel object rather than a handle and the absolute priority.
There's also a function called case set based priority which sets the base
priority of the threat which essentially does the same thing.
But instead of just setting the dynamic priority,
which is typically used to set some very high priority in the real time range,
even if the threat is running in the process which is not in the real
time priority class but it is also possible to use the other um a bit
less useful function called k set based priority threat which sets the
base priority of the threat of that particular threat in whatever
process that it's in.
Let's see some examples of using these APIs