Hi,
Can anyone help with a few elementary questions about serial port IO in
Windows?
When a serial port file is created for concurrent reading and writing using
CreateFile with dwDesiredAccess:= GENERIC_READ or GENERIC_WRITE, can one
assume that the file may be used as if it supports two totally independent,
concurrent data streams, an input stream, and an output stream, without any
interaction between them? Thus does the serial port driver, or the OS,
effectively internally operate a critical section that allows only one byte
from either the outbound or the inbound streams through the port at a time,
and transfer inbound or outbound bytes to associated data queues?
If 2 computers A and B are connected via an RS-232 cable, do serial port
communication programs on each have to be started manually in order for data
communication to take place, or is it possible, using serial port API
functions, to get the client program on computer A to get the OS on computer
B to launch the server program on computer B?
Is it possible to obtain a list of hardware I/O ports from the operating
system?
To allow an application that performs asynchronous I/O to a serial port in
two separate threads (one for reading, the other for writing) to be tested
on a single computer without the need to set up a serial connection to
another computer or device, is there any way that the file mapped to the
serial port can be set up so that the output stream feeds back into the
input stream?
TIA,
EM