ResetEvent
ResetEvent
Windows Mobile SupportedWindows Embedded CE Supported
8/28/2008

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

Syntax


BOOL ResetEvent(
  HANDLE hEvent
);
Parameters

hEvent

[in] Handle to the event object, returned by the CreateEvent function.

Return Value

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 signaled. The ResetEvent function is used primarily for manual signal event objects, which must be set explicitly to the nonsignaled state. Auto-signal event objects automatically change from signaled to nonsignaled after a single waiting thread is released.

Each object type, such as memory maps, semaphores, events, message queues, mutexes, and watchdog timers, has its own separate namespace. Empty strings, "", are handled as named objects. On Windows desktop-based platforms, synchronization objects all share the same namespace.

Requirements

Headerkfuncs.h
Librarycoredll.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later
See Also

Reference

Synchronization Functions
CreateEvent
PulseEvent
OpenEvent
SetEvent

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View