ITask::SetPriority 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 sets the priority for the task.
HRESULT SetPriority( DWORD dwPriority );
A DWORD that specifies the priority for the current task. The priority of a task 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. These values are taken from the CreateProcess priority class and can be one of following flags (in descending order of thread scheduling priority):
The SetPriority method returns one of the following values.
||The operation was successful.|
||The arguments are not valid.|
After setting the priority of a task, call IPersistFile::Save to save the modified task object to disk.
For more information and an example of how to set the priority of a task, see C/C++ Code Example: Setting Task Priority.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|