ResetEvent

This function sets the state of the specified event object to nonsignaled.

BOOL ResetEvent( 
  HANDLE hEvent 
); 

Parameters

  • hEvent
    [in] Handle to the event object. The CreateEvent function returns this handle.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

ResetEvent returns FALSE if the handle to the event object is invalid.

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

ResetEvent sets the event to the nonsignaled state even if the event was signaled multiple times before being reset.

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.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Kfuncs.h.
Link Library: Coredll.lib.

See Also

CreateEvent | PulseEvent | SetEvent

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.