WSACloseEvent

The Windows Sockets WSACloseEvent function closes an open event object handle.

BOOL WSACloseEvent(
  WSAEVENT hEvent   
);
 

Parameters

hEvent
[in] An object handle identifying the open event.

Remarks

The handle to the event object is closed so that further references to this handle will fail with the error WSA_INVALID_HANDLE.

Return Values

If the function succeeds, the return value is TRUE.

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

Error Codes

WSANOTINITIALISED A successful WSAStartup 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 is not a valid event object handle.

QuickInfo

  Windows NT: Yes
  Windows: Yes
  Windows CE: Unsupported.
  Header: Declared in winsock2.h.
  Import Library: Link with ws2_32.lib.

See Also

WSACreateEvent, WSAEnumNetworkEvents, WSAEventSelect, WSAGetOverlappedResult, WSARecv, WSARecvFrom, WSAResetEvent, WSASend, WSASendTo, WSASetEvent, WSAWaitForMultipleEvents