Share via


ISpTaskManager::QueueTask (Windows Embedded CE 6.0)

1/6/2010

This method adds a task to the queue for asynchronous task processing.

Syntax

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 Value

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

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpTaskManager
SAPI Interfaces