Kernel32SetThreadPriority Method

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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll")]
public static bool SetThreadPriority(
	IntPtr hThread,
	ThreadPriorityLevel nPriority
)

Parameters

hThread  IntPtr
A handle to the process.

This handle must be created with the SetInformation or SetLimitedInformation access right.

nPriority  ThreadPriorityLevel
The priority value for the thread.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also