I have opened a comms port and I am reading data being sent to me. The program runs OK for a day or two (or three!) then ReadFile() returns FALSE with GetLastError() returning 5 (Access Denied). If I exit the application and re-start it, it works again.
The data rate is trivial so it doesnt appear to be due to an overflow.
The comms port is on a USB/serial adapter and the program is compiled using MSDEV 2008. I am not using overlapped access.
Anyone have any ideas what could be causing this or what I could try?