The documentation for [`WSACreateEvent`](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsacreateevent) says that it returns a value of type `WSAEVENT`. In case of failure, it returns `WSA_INVALID_EVENT`. However, in `windows-sys`, `WSAEVENT` is not defined and it [returns a `HANDLE`](https://docs.rs/windows-sys/0.48.0/windows_sys/Win32/Networking/WinSock/fn.WSACreateEvent.html). `WSA_INVALID_EVENT` is also not defined. There is [`INVALID_HANDLE_VALUE`](https://docs.rs/windows-sys/0.48.0/windows_sys/Win32/Foundation/constant.INVALID_HANDLE_VALUE.html). However, its value is `-1`, while `WSA_INVALID_EVENT` is `NULL` (looking at `winsock2.h`). Am I missing something? I think there should be `WSAEVENT` and `WSA_INVALID_EVENT` to avoid confusion.
Activity
kennykerr commentedon Jun 5, 2023
Looks like an issue with the Win32 metadata.
`WSAEVENT` and `WSA_INVALID_EVENT`. Fixed microsoft#1587.