Click to See Complete Forum and Search --> : how to set application to read data from com port only when newline char is received.


abinash_y
July 24th, 2003, 01:46 PM
Hi,
i m trying to read from serial port in a multithread application for reading from comport and writing to comport.

my data coming to serial port is runtime and is devided in by newline char (i mean data is runtime, each line up to newline reprents something and i need to perform operation on each line).

what i m able to do is read data char by char from comport as soon they come (using setEvent) and what i want is to read from com port after every newline char received and aslo do not want to loose any data.

any help would be appreciated.

i m using xp and visual c++, rich edit text view.and win32 api fn to read, write, set port.

thanks
Abi