SetEvent

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

BOOL SetEvent(
  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

The state of a manual-reset event object remains signaled until it is set explicitly to the nonsignaled state by the ResetEvent function. Any number of waiting threads, or threads that subsequently begin wait operations for the specified event object by calling one of the wait functions, can be released while the object's state is signaled.

The state of an auto-reset event object remains signaled until a single waiting thread is released, at which time the system automatically sets the state to nonsignaled. If no threads are waiting, the event object's state remains signaled.

Requirements

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

See Also

CreateEvent | PulseEvent | ResetEvent | WaitForSingleObject

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.