ISpTaskManager::QueueTask (Windows CE 5.0)
This method adds a task to the queue for asynchronous task processing.
HRESULT QueueTask(ISpTask pTask, void* pvTaskData, HANDLE hCompEvent, DWORD** pdwGroupId,DWORD** pTaskID);
Parameters
- pTask
[in] Pointer to an object implementing ISpTask that represents the task. - pvTaskData
[in] Pointer to task data that will be passed to the ISpTask::Execute method. - hCompEvent
[in] Handle to the task completion event. This parameter can be NULL. This event will be set when the ISpTask::Execute method returns. - pdwGroupId
[in, out] On input, pointer to the identifier for the task group. On output, address of a pointer to this identifier. This parameter can be NULL. It can be used to cancel a group of pending tasks. - pTaskID
[out] Address of a pointer to the identifier for the task. This parameter can be NULL if the information is not needed.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | pTask is invalid or bad. |
E_POINTER | pTaskId or pdwGroupId is invalid or bad. |
FAILED(hr) | Appropriate error message. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapiddk.h, Sapiddk.idl.
Link Library: Sapilib.lib.
See Also
ISpTaskManager | SAPI Interfaces
Send Feedback on this topic to the authors