http://bugs.winehq.org/show_bug.cgi?id=12302
--- Comment #71 from Andreas Blochberger andreas@blochberger.net 2008-07-17 02:21:24 --- In the API documentation for WSAGetLastError (http://msdn.microsoft.com/en-us/library/ms898741.aspx) you can read the following: "The return value indicates the error code for this thread's last Windows Sockets operation that failed"
If WSASendTo returns 0, then it did not fail, so a call to WSAGetLastError would be undefined (returning the last error of the last function that really failed). But it may be, that the Windows function resets the last error. But by contract, it would not have to do so, or is not even allowed to do so. So, the error in the lotroclient would be, that it calls WSAGetLastError regardless of the result of the WSASendTo.
If the Windows function resets the last error on success, then of course the wine function should do this as well, although it would be wrong, according to the API documentation.