ISpThreadTask::InitThread (Windows Embedded CE 6.0)
1/6/2010
This application-specific method initializes a thread that is allocated by a call to the ISpThreadControl::StartThread method. The caller of StartThread is blocked until ISpThreadTask::InitThread completes and returns. ISpThreadControl::StartThread then returns the code returned by InitThread. If the return code indicates failure, the thread is terminated and StartThread fails.
Syntax
virtual HRESULT STDMETHODCALLTYPE InitThread(
void* pvTaskData,
HWND hwnd
) = 0;
Parameters
- pvTaskData
[in] Pointer to task data. This is the same data that is passed to ISpTaskManager::CreateThreadControl.
- hwnd
[in] Window handle, or NULL. This parameter contains a handle only if the caller originally passed a pointer to a non-null window handle to ISpTaskManager::CreateThreadControl.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
Other success |
Success code returned to ISpThreadControl::StartThread method, and thread will continue. |
Failure code |
Function failed. Failure code returned to StartThread, and thread is terminated. |
Requirements
Header | sapiddk.h, sapiddk.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |