Share via


ISpTaskManager::CreateThreadControl (Windows Embedded CE 6.0)

1/6/2010

This method allocates a thread control object, but does not allocate a thread.

Syntax

HRESULT CreateThreadControl(
  ISpThreadTask* pTask,
  void* pvTaskData,
  long nPriority,
  ISpThreadControl** ppThreadCtrl
);

Parameters

  • pTask
    [in] Pointer to an object implementing ISpThreadTask that is used to initialize and execute the task thread.
  • pvTaskData
    [in] Pointer to data that will be passed to all ISpThreadTask methods. This value can be NULL.
  • nPriority
    [in] Win32 priority for the allocated thread.
  • ppThreadCtrl
    [out] Address of a pointer to an object implementing ISpThreadControl that represents the thread control.

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

ppThreadCtrl is invalid or bad.

E_OUTOFMEMORY

Exceeded available memory.

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