Skip to content

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 from ole32.dll, not kernel32.dll.

  • CoWaitForMultipleObjects signature is completely wrong (and misses stdcall to boot).

  • CoWaitForMultipleObjects return value is incompatible with WaitFor*, it needs its own branch.

  • THandleObject.WaitForMultiple passes an array of THandleObject instead of array of Windows.HANDLE directly to WinAPI functions, really? :D I also removed Len parameter and changed HandleObjs to open array and made Len = 0 work as Len = length(HandleObjs). (Default value of Len = 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.

Edited by Rika
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information