GetThreadPriority Procedure

Returns the current thread priority.

Syntax

[ enPriority = ] GetThreadPriority ( hThread )

The GetThreadPriority procedure syntax has the following parts:

 

Name

Type

Description

enPriority

enumAThreadPriority

Priority of the thread.

hThread

Val AHandle

Handle to the thread.

Where

enumAThreadPriority can be one of the following values:

 

Name

Value

Description

apriorityIdle

-15

Idle

apriorityLowest

-2

Lowest

apriorityBelowNormal

-1

Below Normal

apriorityNormal

0

Normal

apriorityAboveNormal

1

Above Normal

apriorityHighest

2

Highest

apriorityTimeCritical

15

Time Critical

aPriorityError

0x7FFFFFFF

Error (wrong thread handle when calling GetThreadPriority v11 build 160c

Example

The following example will get the priority of the current thread:

enThreadPriority1 = GetThreadPriority (hThread)

See Also

GetCurrentThread, SetThreadPriority