ISpTaskManager::CreateThreadControl
This method allocates a thread control object, but does not allocate a thread.
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 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 | ppThreadCtrl is invalid or bad. |
E_OUTOFMEMORY | Exceeded available memory. |
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
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.