ResetEvent  06KA95 

The ResetEvent function sets the state of the specified event object to nonsignaled.

BOOL ResetEvent(

    HANDLE hEvent

// handle of event object

   );

 

 

Parameters

hEvent

Identifies the event object. The CreateEventJ_ZBJV or OpenEventQTG5JZ function returns this handle.

Windows NT: The handle must have EVENT_MODIFY_STATE access. For more information, see Interprocess Synchronization Objects2.IIDK5.

 

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError11C2VS7.

Remarks

The state of an event object remains nonsignaled until it is explicitly set to signaled by the SetEventAT02D. or PulseEvent7D.L0ZU function. This nonsignaled state blocks the execution of any threads that have specified the event object in a call to one of the wait functionsY2TC_3.

The ResetEvent function is used primarily for manual-reset event objects, which must be set explicitly to the nonsignaled state. Auto-reset event objects automatically change from signaled to nonsignaled after a single waiting thread is released.

See Also

CreateEvent, OpenEvent, PulseEvent, SetEvent