Sign in Join
Wiki copytemporary

SetPriorityClass

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:

pascal
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;

From the Free Pascal wiki, page "SetPriorityClass", as it stood on 2020-02-26 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.