sgomon
2005-08-17 02:41:05 UTC
I am using WriteFile() to write to a serial port on an embedded CE device
without overlapping. Very intermittantly, WriteFile() will return 0 in
lpNumberOfBytesWritten, but the function returns 1 (Success). GetLastError()
will return 0 when called right after WriteFile(). Most of the time it works
as expected. I can run the same app on the same data many times in a row
successfully between failures.
Why would it return 1, but write zero bytes?
without overlapping. Very intermittantly, WriteFile() will return 0 in
lpNumberOfBytesWritten, but the function returns 1 (Success). GetLastError()
will return 0 when called right after WriteFile(). Most of the time it works
as expected. I can run the same app on the same data many times in a row
successfully between failures.
Why would it return 1, but write zero bytes?