Helle friends
Still fighting with my serial printers.. :)
I upgrade my wine sources today with CVS and more advantages are in this new code (i'm very happy) but with one printer i receive the messages: trace:file:fd is not overlapped
i comment the lines //if ( ! (flags & FD_FLAG_OVERLAPPED) ) { // WARN ( "fd is not overlapped\n" ); // SetLastError ( ERROR_INVALID_PARAMETER ); // goto error; //}
in files/file.c
and my printer communicate good.
What i can change in my application to work with serial in this case
See in +comm,+file
trace:comm:ClearCommError handle 48 cbInQue = 2 cbOutQue = 0 trace:file:ReadFile 48 0x10025308 2 0x40566828 (nil) trace:file:FILE_TimeoutRead 48 0x10025308 2 0x40566828 trace:file:FILE_ReadFileEx file 48 to buf 0x10025308 num 2 0x40566794 func (nil) warn:file:FILE_ReadFileEx fd is not overlapped trace:comm:ClearCommError handle 48 cbInQue = 2 cbOutQue = 0 trace:file:ReadFile 48 0x10025308 2 0x40566828 (nil) trace:file:FILE_TimeoutRead 48 0x10025308 2 0x40566828 trace:file:FILE_ReadFileEx file 48 to buf 0x10025308 num 2 0x40566794 func (nil) warn:file:FILE_ReadFileEx fd is not overlapped
Marcelo
On Fri, 26 Apr 2002, Marcelo Welter wrote:
I upgrade my wine sources today with CVS and more advantages are in this new code (i'm very happy) but with one printer i receive the messages: trace:file:fd is not overlapped
Allright, another bug of mine :(
I wasn't aware that FILE_ReadFileEx can be called on non-overlapped file descriptors. The lines you deleted were basically a double-check, removing them should do no harm.
So here we are:
--- files/file.c.orig Fri Apr 26 18:48:40 2002 +++ files/file.c Fri Apr 26 18:50:41 2002 @@ -1562,11 +1562,6 @@ WARN ( "Couldn't get FD\n" ); return FALSE; } - if ( ! (flags & FD_FLAG_OVERLAPPED) ) { - WARN ( "fd is not overlapped\n" ); - SetLastError ( ERROR_INVALID_PARAMETER ); - goto error; - }
ovp = (async_fileio*) HeapAlloc(GetProcessHeap(), 0, sizeof (async_fileio)); if(!ovp) @@ -1788,11 +1783,6 @@ { TRACE( "Couldn't get FD\n" ); return FALSE; - } - if ( ! (flags & FD_FLAG_OVERLAPPED) ) { - WARN ( "fd is not overlapped\n" ); - SetLastError ( ERROR_INVALID_PARAMETER ); - goto error; }
ovp = (async_fileio*) HeapAlloc(GetProcessHeap(), 0, sizeof (async_fileio));