SetPriorityClass

This is an old revision of SetPriorityClass, edited by Cringer000 at . The current revision is 68342.

SetPriorityClass - a function that sets the priority class for a specified process.

SetPriorityClass - a function that sets the priority class for a specified process. This function is specific to Windows.

The SetPriorityClass may have one of the following priority classes:

Use caution when using REALTIME_PRIORITY_CLASS. It can potentially take so much of the CPU resources that there may not be anything left for other items to run, including operating system requests.

EXAMPLE:

<delphi> uses Windows; // Unit containing the SetPriorityClass function.

procedure TForm1.FormCreate(Sender: TObject); begin

    SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
    // Sets the current running application to High Priority.

end;

</delphi>