Adds a task to the scheduler's background queue.
HRESULT AddTask( IRunnableTask *prt, REFTASKOWNERID rtoid, DWORD_PTR lParam, DWORD dwPriority );
A pointer to an instance of an IRunnableTask interface representing the task to add to the queue.
A pointer to a user-defined DWORD value allowing the task to be identified within the tasks owned by rtoid. This is used to identify single tasks or to subgroup them, for instance associating the task with a particular item such as an item in a ListView. This parameter can be zero.
One of the following values assigning the task's priority. Response to this priority depends on the cooperation of the other tasks being executed. New tasks are inserted in the queue in priority order. If a task of a low priority is currently under execution when a higher priority task is added, the scheduler attempts to suspend the task under execution. That lower priority task is resumed when the higher priority task(s) are completed.
Accept the default priority assigned to the task by the scheduler.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|
|DLL||Shell32.dll (version 5.0 or later)|