I have developed a class that access the serial ports of a PC. I have one problem though. If I am reading the buffer and I come to the end of the text the app waits until it finds a return character. Is there a way to use the CreateFile and Readfile functions so that you can detect the end of file?