Jinoh Kang (@iamahuman) commented about programs/services/rpc.c:
if (ret == WAIT_TIMEOUT) { WINE_ERR("receiving command result timed out\n"); - *result = ERROR_SERVICE_REQUEST_TIMEOUT; - return FALSE; + if (!CancelIoEx(process->control_pipe, &overlapped)) + WINE_ERR("Failed to cancel IO, %#lx\n", GetLastError()); } - r = GetOverlappedResult(process->control_pipe, &overlapped, &count, FALSE); + r = GetOverlappedResult(process->control_pipe, &overlapped, &count, TRUE); } if (!r || count != sizeof *result) + { + DWORD error = GetLastError();
GetLastError() is invalid if r is TRUE. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10424#note_134681