Freigeben über


WSAResetEvent Function

The WSAResetEvent function resets the state of the specified event object to nonsignaled.

Syntax

BOOL WSAResetEvent(
  __in  WSAEVENT hEvent
);

Parameter

  • hEvent [in]
    A handle that identifies an open event object handle.

Rückgabewert

If the WSAResetEvent function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call WSAGetLastError.

Error code Meaning
WSANOTINITIALISED

A successful WSAStartup call must occur before using this function.

WSAENETDOWN

The network subsystem has failed.

WSAEINPROGRESS

A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.

WSA_INVALID_HANDLE

The hEvent parameter is not a valid event object handle.

 

Hinweise

The WSAResetEvent function is used to set the state of the event object to nonsignaled.

The proper way to reset the state of an event object used with the WSAEventSelect function is to pass the handle of the event object to the WSAEnumNetworkEvents function in the hEventObject parameter. This will reset the event object and adjust the status of active FD events on the socket in an atomic fashion.

Anforderungen

Mindestens unterstützter Client

Windows 2000 Professional

Mindestens unterstützter Server

Windows 2000 Server

Header

Winsock2.h

Bibliothek

Ws2_32.lib

DLL

Ws2_32.dll

Siehe auch

Winsock Reference

Winsock Functions

WSACloseEvent

WSACreateEvent

WSAEnumNetworkEvents

WSAEventSelect

WSASetEvent