Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.17 KB

SetThreadPriority.md

File metadata and controls

46 lines (32 loc) · 1.17 KB

Home

Function name : SetThreadPriority

Group: Process and Thread - Library: kernel32


Sets the priority value for the specified thread. This value, together with the priority class of the thread"s process, determines the thread"s base priority level.


Code examples:

Reading and setting the priority class values for the current process and thread

Declaration:

BOOL SetThreadPriority(
  HANDLE hThread, // handle to the thread
  int nPriority   // thread priority level
);  

FoxPro declaration:

DECLARE INTEGER SetThreadPriority IN kernel32;
	INTEGER hThread,;
	INTEGER nPriority  

Parameters:

hThread [in] Handle to the thread whose priority value is to be set.

nPriority [in] Specifies the priority value for the thread. This parameter can be one of the predefined values.


Return value:

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.