Trunk is incompatible with Windows 7/XP, COM waiting and the entire THandleObject.WaitForMultiple are broken.
Patch: cowait.patch.
Just apply and don’t read further, seriously. >,,,<
See these complaints. Corresponding commit was broken in numerous ways, even if you don’t use COM waits:
-
Don’t know when
CoWaitForMultipleObjects
was introduced, but definitely later than Windows 7 (and XP),CoWaitForMultipleHandles
is an earlier alternative. -
CoWaitForMultipleObjects
is imported fromole32.dll
, notkernel32.dll
. -
CoWaitForMultipleObjects
signature is completely wrong (and missesstdcall
to boot). -
CoWaitForMultipleObjects
return value is incompatible withWaitFor*
, it needs its own branch. -
THandleObject.WaitForMultiple
passes anarray of THandleObject
instead ofarray of Windows.HANDLE
directly to WinAPI functions, really? :D I alsoremovedchangedLen
parameter andHandleObjs
to open array and madeLen = 0
work asLen = length(HandleObjs)
. (Default value ofLen = 0
has no sense, being invalid.)
Moreover, I ventured to remove everything that pertains to wrAbandoned
in intbasiceventWaitFor
, as only mutexes can be abandoned. On my computer, CoWaitForMultipleObjects
does not even support abandonment: acquiring a mutex whose previous owner crashed returns plain S_OK
. In any case, events are not mutexes, have no owners and cannot be abandoned at all.