ISpThreadTask::ThreadProc (SAPI 5.4)
Microsoft Speech API 5.4
ISpThreadTask::ThreadProc
ISpThreadTask::ThreadProc implements the main processing loop of the thread. This method will be application specific.
virtual HRESULT STDMETHODCALLTYPE ThreadProc(
void *pvTaskData,
HANDLE hExitThreadEvent,
HANDLE hNotifyEvent,
HWND hwndWorker,
volatile const BOOL *pfContinueProcessing
) = 0;
Parameters
- pvTaskData
[in] Pointer passed to ISpTaskManager::CreateThreadControl. - hExitThreadEvent
[in, out] An event handle which when signaled indicates that the thread process should exit. - hNotifyEvent
[in] A handle to an auto-reset event object that will be set if the ISpThreadControl::Notify method is called. This functionality is provided for any notification event the client determines, or it can optionally be ignored if it is not needed. - hwndWorker
[in] A window handle. This parameter will be NULL if the caller of ISpThreadControl::StartThread passed a NULL HWND pointer to StartThread. - pfContinueProcessing
[in] Boolean flag indicating whether to continue processing. TRUE indicates the process should continue; FALSE otherwise. This mirrors the functionality of the hExitThreadEvent, but provides a lightweight mechanism for checking for a request to exit without calling a Win32 WaitForxxx object function.
Return values
S_OK | Function completed successfully. |
S_FAILED | Function failed. |