Am 2017-12-04 um 18:43 schrieb Piotr Caban:
I wonder if native works well if time difference doesn't fit into ULONG, did you check that?
With native the app works fine. I haven't tested if the app passes the same parameters with native. Extending the existing tests in msvcp120/tests also seems to work.
(_Cnd_timedwait just sits there and waits, instead of returning with timeout immediately. I obviously haven't waited 30 days to see if it times out then)
If it doesn't - the simplest fix would be to do something like this> timeout.QuadPart = (ULONGLONG)((ULONG)_Xtime_diff_to_millis(xt)) * -10000;
This works, but I could swear I tried that myself and it didn't work then - hence my wondering of casts vs assignments.