Connection failure - WSAGetLastError returns 126 "The specified module could not be found."
I got a special case here where WSAGetLastError returns 126 (ERROR_MOD_NOT_FOUND)
it happens here: https://github.com/solemnwarning/ipxwrapper/blob/1608da463cb20e68bf70a68ac6da656af2b62a58/src/directplay.c#L91
The result of it is that the socket will be closed and the multiplayer part doesn't work anymore: ipxwrapper.zip
I added ERROR_MOD_NOT_FOUND to your WSAEWOULDBLOCK and WSAECONNRESET check so the error gets ignored. It does fix the problem, but I'm not sure if that's the correct solution? I don't understand how it could return ERROR_MOD_NOT_FOUND on WSAGetLastError, you have any ideas what's up with that?
No I'm not sure... all the winsock DLLs will already be loaded at that point, the recvfrom() call there will descend into recvfrom() in winsock.c via a couple of stub functions if you want to try tracing it deeper.
No I'm not sure... all the winsock DLLs will already be loaded at that point, the
recvfrom()call there will descend intorecvfrom()inwinsock.cvia a couple of stub functions if you want to try tracing it deeper.
Ah that's nice, I didn't even pay attention to that.
BTW, the bug happens because the fan patch did include "dplayx.dll" inside of the game folder, this is so you don't have to install DirectPlay manually (it does not always install, some people have issues).
If you copy dplayx.dll from your windows/system32 folder into your game folder you should be able to reproduce it as well (seems to happen with other games as well - tested on xp/7/10)