WaitForMultipleObjectsEx will not take up to MAXIMUM_WAIT_OBJECTS
Bryan Mayland
bmayland at leoninedev.com
Tue Mar 21 11:35:28 CST 2006
I've been digging into why versions of uTorrent greater than 1.1.3 do
not work under the latest wine and tracked it down to their use of
WSAEventSelects to receive socket notifications. I created a small test
application which mimics this behavior which works under WindowsXP but
not wine.
The problem is that they create MAXIMUM_WAIT_OBJECTS events and pass
them to WaitForMultipleObjectsEx. That function bails out early due to
dlls/kernel/sync.c:173:
176 if (count >= MAXIMUM_WAIT_OBJECTS)
177 {
178 SetLastError(ERROR_INVALID_PARAMETER);
179 return WAIT_FAILED;
180 }
Windows supports up to and including that number, wine only supports up
to that number. Since the rest of the code actually does support the
full 64 wait objects, is there any reason this should not be changed to
176 if (count > MAXIMUM_WAIT_OBJECTS)
More information about the wine-devel
mailing list