WSASetEvent

WSASetEvent sets the state of the specified event object to signaled.

Syntax

BOOL WSASetEvent(
    __in WSAEVENT hEvent
);

Parameters

hEvent

An open event object handle.

Return Values

A handle to the event object if the function succeeds, NULL if the function fails

To get extended error information, call WSAGetLastError

Remarks

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

In the case of an auto-reset event object, the WSASetEvent function resets the state to non-signaled and returns after releasing, or the event remains signaled until a single waiting thread is released, at which time the system automatically sets the state to non-signaled. If no threads are waiting, the event object's state remains signaled.

Requirements

Library Rtxtcpip.lib
IntervalZero.com | Support | Give Feedback