I have a custom made device with which I send/receive data trough the serial port. I was wondering if there is any function I can use to get the count of bytes waiting to be read from the serial port?
I want only a windows api solution, if there exists one. It seems a trivial task and I don’t want to use external components.
ClearCommErrorshould fill in aCOMSTAT(TComStat record) having a ‘cbInQue’ member specifying unread number of bytes received on the port.