ISpThreadTask (SAPI 5.3)
The ISpThreadTask interface simplifies thread-based operations. Clients can implement this virtual C++ interface to simplify the management of threads. SAPI provides coordination methods for starting, initializing, and stopping the thread. See the ISpThreadControl documentation for more information. Clients simply implement three methods which will be called on the allocated thread.
When to Implement
Use SpThreadControl objects to allocate threads for an object.
This is not a COM interface.
Methods in Vtable Order
|InitThread||Method called on the allocated thread. If the method returns an error, the ISpThreadControl::StartThread method will fail.|
|ThreadProc||Implements the processing of the thread.|
|WindowMessage||Implements the processing of window messages.|