? patch.diff Index: files/file.c =================================================================== RCS file: /home/wine/wine/files/file.c,v retrieving revision 1.131 diff -r1.131 file.c 1359c1359,1360 < LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) --- > LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine, > HANDLE hCompletionEvent) 1391a1393 > ovp->completion_event = hCompletionEvent; 1424,1429c1426 < return FILE_ReadFileEx(hFile,buffer,bytesToRead,overlapped,lpCompletionRoutine); < } < < static VOID CALLBACK FILE_OverlappedComplete(DWORD status, DWORD count, LPOVERLAPPED ov) < { < NtSetEvent(ov->hEvent,NULL); --- > return FILE_ReadFileEx(hFile,buffer,bytesToRead,overlapped,lpCompletionRoutine,(HANDLE)0L); 1442c1439,1441 < if(ReadFileEx(hFile, buffer, bytesToRead, &ov, FILE_OverlappedComplete)) --- > ov.Internal = STATUS_PENDING; > ov.InternalHigh = 0; > if(FILE_ReadFileEx(hFile, buffer, bytesToRead, &ov,NULL,ov.hEvent )) 1509c1508 < if(!FILE_ReadFileEx(hFile, buffer, bytesToRead, overlapped, FILE_OverlappedComplete)) --- > if(!FILE_ReadFileEx(hFile, buffer, bytesToRead, overlapped, NULL, overlapped->hEvent )) 1606c1605,1606 < LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) --- > LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine, > HANDLE hCompletionEvent) 1639a1640 > ovp->completion_event = hCompletionEvent; 1670c1671 < return FILE_WriteFileEx(hFile, buffer, bytesToWrite, overlapped, lpCompletionRoutine); --- > return FILE_WriteFileEx(hFile, buffer, bytesToWrite, overlapped, lpCompletionRoutine, (HANDLE)0L); 1733c1734 < if(!FILE_WriteFileEx(hFile, buffer, bytesToWrite, overlapped, FILE_OverlappedComplete)) --- > if(!FILE_WriteFileEx(hFile, buffer, bytesToWrite, overlapped, NULL, overlapped->hEvent)) Index: include/file.h =================================================================== RCS file: /home/wine/wine/include/file.h,v retrieving revision 1.37 diff -r1.37 file.h 46a47 > HANDLE completion_event; Index: scheduler/synchro.c =================================================================== RCS file: /home/wine/wine/scheduler/synchro.c,v retrieving revision 1.40 diff -r1.40 synchro.c 20c20 < --- > #include <stdio.h> 57a58,63 > } > /* set ReadFile/WriteFile's overlapped completion event */ > if (ovp->completion_event) > { > NtSetEvent( ovp->completion_event, NULL ); > ovp->completion_event=NULL; Index: server/serial.c =================================================================== RCS file: /home/wine/wine/server/serial.c,v retrieving revision 1.17 diff -r1.17 serial.c 265a266,267 > if (timeout<0) > timeout=0x7FFFFFFF; 273a276,277 > if (timeout<0) > timeout=0x7FFFFFFF;