Microsoft Speech SDK
SAPI 5.1
ISpTaskManager::QueueTask
ISpTaskManager::QueueTask 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] Address of an ISpTask interface containing the task.
- pvTaskData
- [in] Address of the task data that will be passed to the ISpTask::Execute method.
- hCompEvent
- [in] Handle of the task completion event. This event will be set when the Execute method returns. This parameter can be NULL.
- pdwGroupId
- [in, out] Value specifying the identifier for the task group. This value may be NULL. This can be used to cancel a group of pending tasks.
- pTaskID
- [out] Value specifying the task identifier. This parameter can be NULL if this information is not needed.
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. |