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 CoWaitForMultipleObjectswas introduced, but definitely later than Windows 7 (and XP),CoWaitForMultipleHandlesis an earlier alternative.
- 
CoWaitForMultipleObjectsis imported fromole32.dll, notkernel32.dll.
- 
CoWaitForMultipleObjectssignature is completely wrong (and missesstdcallto boot).
- 
CoWaitForMultipleObjectsreturn value is incompatible withWaitFor*, it needs its own branch.
- 
THandleObject.WaitForMultiplepasses anarray of THandleObjectinstead ofarray of Windows.HANDLEdirectly to WinAPI functions, really? :D I alsoremovedchangedLenparameter andHandleObjsto open array and madeLen = 0work asLen = length(HandleObjs). (Default value ofLen = 0has 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.