There are many places where we need to do a conversion between the unix errno and the windows ntstatus (and then sometimes to dos errors). Here are some that I found:
http://source.winehq.org/source/server/file.c#L582 http://source.winehq.org/source/server/sock.c#L702 http://source.winehq.org/source/dlls/wininet/netconnection.c#L512 http://source.winehq.org/source/dlls/winhttp/net.c#L153 http://source.winehq.org/source/dlls/ntdll/file.c#L312
Would it be a good idea to perhaps create an include file for both the server and the dlls to convert unix error codes to status/winsock error codes? The reason for 2 functions is winsock error codes do not actually map to any status code, they seem to be there to make porting easier (ie STATUS_CONNECTION_RESET maps to ERROR_CONNECTION_RESET). Does this seem reasonable, or should we just keep duplicating the conversion code everywhere? I have not checked whether there are places that have different statuses for the same unix error, but presumably we can pick a reasonable default and just have special cases within the module.
This is coming from some conversion within the server. The server should not return wsa-based error codes in its error events list, and just use wsa conversion when sending window messages.
Mike.