WaitForMultipleObjects loops forever if passed an array of size zero
Troy Rollo
wine at troy.rollo.name
Thu Jun 26 02:08:12 CDT 2003
On Thu, 26 Jun 2003 15:59, Troy Rollo wrote:
> With the condition as (count > MAXIMUM_WAIT_OBJECTS || (count <= 0 &&
> !timeout)), wine's behaviour mirrors that of Win2k, at least for the
> WaitForMultipleObjectsEx(0, 0, INFINITE, QS_ALLEVENTS, 0) case.
While I somehow got MsgWaitForMultipleObjectsEx mixed up with WaitForMultiple
ObjectsEx (too many MSDN windows open), an appropriate test with
WaitForMultipleObjectsEx(0, NULL, FALSE, INFINITE, FALSE) gives the same
result, but...
It now occurs to me that this fix not entirely right either - or at least it
doesn't avoid creating another bug, since Sleep(INFINITE) is valid, and Sleep
goes through WaitForMultipleObjectsEx.
However, since WaitForMultipleObjectsEx(0, NULL, FALSE, INFINITE, FALSE)
returns an error on Win2k, this use of WaitForMultipleObjectsEx to implement
Sleep must be wrong.
More information about the wine-devel
mailing list