Serial Port Information
Posted: Mon Jun 21, 2004 8:21 pm
Here is a program to look for any installed serial ports (Com1 - 16).
For each port found, an attempt is made to send and receive data,
Actually, the data sent is a standard modem request that should return
the modem's information if the port has an attached modem.
NOTE: This uses several WinAPI calls
The code includes examples of:
Defining the DCB
Setting the COMM State
Setting the COMM Timouts
Setting the COMM Buffers
Purging the COMM Buffers
Sending data to a COMx port
Receiving data from a COMx port
Panel and ListIcon gadget handling
SplashMsg (thanks to Vanleth and PB)
An executable and the source code is available <a href="http://www.electrofile.com/purebasic/in ... P">HERE</a>.
Screenshot

Hope you find this useful,
Terry
For each port found, an attempt is made to send and receive data,
Actually, the data sent is a standard modem request that should return
the modem's information if the port has an attached modem.
NOTE: This uses several WinAPI calls
The code includes examples of:
Defining the DCB
Setting the COMM State
Setting the COMM Timouts
Setting the COMM Buffers
Purging the COMM Buffers
Sending data to a COMx port
Receiving data from a COMx port
Panel and ListIcon gadget handling
SplashMsg (thanks to Vanleth and PB)
An executable and the source code is available <a href="http://www.electrofile.com/purebasic/in ... P">HERE</a>.
Screenshot
Hope you find this useful,
Terry