SetEvent

Sets an event object to the signalled state, possibly waking sleeping threads.

int SetEvent (EVENT value);

Required Header
<process.h>

Return Value

Non zero signifies a successful set.

Parameters

e

  The EVENT object to set

Remarks

The SetEvent function sets the signalled state of an EVENT. O/S calls are made to wake up threads that are waiting on this EVENT and, if those threads are waiting on ALL EVENTs in a Wait-Multiple function call, a check is made to ensure all those events are signalled or else the thread is sent back to sleep.

Note:
When a Wait-Multiple function call is made for ALL events in a list, the function waits until the signalled state of all EVENTS is set even if some EVENTs have changed state multiple times while waiting.

Process and Threads

See Also    _beginthread, _endthread, _syncthread, CreateEvent, ResetEvent, EventStatus, WaitForSingleEvent, WaitForMultipleEvents, CloseEvent