Paul Gofman (@gofman) commented about dlls/kernelbase/sync.c:
*/ DWORD WINAPI DECLSPEC_HOTPATCH WaitForSingleObjectEx( HANDLE handle, DWORD timeout, BOOL alertable ) { - return WaitForMultipleObjectsEx( 1, &handle, FALSE, timeout, alertable ); + NTSTATUS status; + LARGE_INTEGER time; + + status = NtWaitForSingleObject( normalize_std_handle( handle ), alertable, + get_nt_timeout( &time, timeout ) ); + if (HIWORD(status)) /* is it an error code? */ + { + SetLastError( RtlNtStatusToDosError(status) ); There is set_ntstatus() for this, does it not work here for some reason? But I think it can use more tests besides the case for GetCurrentProcess() handle.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9305#note_120015