Share via


ISpThreadTask::ThreadProc (Windows Embedded CE 6.0)

1/6/2010

This method implements the main processing loop of a thread. This method is application-specific.

Syntax

virtual HRESULT STDMETHODCALLTYPE ThreadProc(
  void* pvTaskData,
  HANDLE hExitThreadEvent,
  HANDLE hNotifyEvent,
  HWND hwndWorker,
  volatile const BOOL* pfContinueProcessing
) = 0;

Parameters

  • hExitThreadEvent
    [in, out] Handle to event indicating that the thread process should exit.
  • hNotifyEvent
    [in] Handle to an auto-reset event that will be set if the ISpThreadControl::NotifyEvent method is called. This parameter applies to any notification event the client determines, or it can optionally be ignored.
  • hwndWorker
    [in] Window handle. This parameter is NULL if the caller of ISpThreadControl::StartThread passed in a null pointer to a window handle.
  • pfContinueProcessing
    [in] Pointer to a value indicating if processing should continue. Set this value to TRUE to continue processing, and to FALSE otherwise. This parameter is set to reflect the input setting of hExitThreadEvent.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

S_FAILED

Function failed.

Requirements

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpThreadTask
SAPI Interfaces