SetEvent

  BOOL SetEvent(hEvent)    
  HANDLE hEvent;    

The SetEvent function sets and event to the signaled state.

Parameters

hEvent

Supplies an open handle to an event object. The handle must have EVENT_MODIFY_STATE access to the event.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.

Comments

Setting the event causes the event to attain a state of Signaled, which releases all currently waiting threads (for manual reset events), or a single waiting thread (for automatic reset events).

See Also

ResetEvent, CreateEvent, PulseEvent