Tech Support > Microsoft Windows > Drivers > Read data from serial RS-232 in passive-mode
Read data from serial RS-232 in passive-mode
Posted by nm on June 23rd, 2005


I have problem on RS-232
I want to read data from serial RS-232 in passive-mode, it mean if
RS-232 have data, my function will be call
If i work on DOS, it's like interrupt hooking (ISR setup) but i don't
know how to do it windows ??
Please help me

Thanks anyway

nm.

Posted by Pavel A. on June 23rd, 2005


"nm" wrote:
In Windows it works this way: you call ReadFile and read request hangs in
the serial driver until some data comes. Then ReadFile completes and you get
control.
If you want to do something useful while waiting, use async variants of
ReadFile (details: in MSDN), or spawn another thread to do normal synchronous
reads. Also you can specify inter-character and total timeouts.

Good luck,
--PA



Similar Posts