ITask::GetPriority method (mstask.h)
[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Interfaces instead.] ]
This method retrieves the priority for the task.
Syntax
HRESULT GetPriority(
[out] DWORD *pdwPriority
);
Parameters
[out] pdwPriority
A pointer to a DWORD that contains the priority for the current task. The priority value determines the frequency and length of the time slices for a process. This applies only to the Windows Server 2003, Windows XP, and Windows 2000 operating systems. It is taken from the CreateProcess priority class and can be one of the following flags (in descending order of thread scheduling priority):
- REALTIME_PRIORITY_CLASS
- HIGH_PRIORITY_CLASS
- NORMAL_PRIORITY_CLASS
- IDLE_PRIORITY_CLASS
Return value
The GetPriority method returns one of the following values.
Return code | Description |
---|---|
|
The operation was successful. |
|
The arguments are not valid. |
|
Not enough memory is available. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mstask.h |
Library | Mstask.lib |
DLL | Mstask.dll |