# Serial Port I/O Library Routines

Paragraph

This section contains descriptions of the Serial Port I/O library routines, which are restricted to Windows* systems. They are listed in alphabetical order.

To access these library routines, you must specify a USE IFPORT statement in your program.

You may also need to add a USE IFWINTY statement to your program because some Windows* constants may be required that are typically defined in the IFWINTY module.

Parent topic: A to Z Reference

- SPORT_CANCEL_IO (W*S)
  Serial Port I/O Function: Cancels any I/O in progress to the specified port.
- SPORT_CONNECT (W*S)
  Serial Port I/O Function: Establishes the connection to a serial port and defines certain usage parameters.
- SPORT_CONNECT_EX (W*S)
  Serial Port I/O Function: Establishes the connection to a serial port, defines certain usage parameters, and defines the size of the internal buffer for data reception.
- SPORT_GET_HANDLE (W*S)
  Serial Port I/O Function: Returns the Windows* handle associated with the communications port. This is the handle that was returned by the Windows API CreateFile.
- SPORT_GET_STATE (W*S)
  Serial Port I/O Function: Returns the baud rate, parity, data bits setting, and stop bits setting of the communications port.
- SPORT_GET_STATE_EX (W*S)
  Serial Port I/O Function: Returns the baud rate, parity, data bits setting, stop bits, and other settings of the communications port.
- SPORT_GET_TIMEOUTS (W*S)
  Serial Port I/O Function: Returns the user selectable timeouts for the serial port.
- SPORT_PEEK_DATA (W*S)
  Serial Port I/O Function: Returns information about the availability of input data.
- SPORT_PEEK_LINE (W*S)
  Serial Port I/O Function: Returns information about the availability of input records.
- SPORT_PURGE (W*S)
  Serial Port I/O Function: Executes the Windows* API communications function PurgeComm on the specified port.
- SPORT_READ_DATA (W*S)
  Serial Port I/O Function: Reads available data from the specified port. This routine stalls until at least one character has been read.
- SPORT_READ_LINE (W*S)
  Serial Port I/O Function: Reads a record from the specified port. This routine stalls until at least one record has been read.
- SPORT_RELEASE (W*S)
  Serial Port I/O Function: Releases a serial port that was previously connected when SPORT_CONNECT was specified.
- SPORT_SET_STATE (W*S)
  Serial Port I/O Function: Sets the baud rate, parity, data bits setting, and stop bits setting of the communications port.
- SPORT_SET_STATE_EX (W*S)
  Serial Port I/O Function: Sets the baud rate, parity, data bits setting, stop bits, and other settings of the communications port.
- SPORT_SET_TIMEOUTS (W*S)
  Serial Port I/O Function: Sets the user selectable timeouts for the serial port.
- SPORT_SHOW_STATE (W*S)
  Serial Port I/O Function: Displays the state of a port to standard output.
- SPORT_SPECIAL_FUNC (W*S)
  Serial Port I/O Function: Executes the Windows* API communications function EscapeCommFunction on the specified port.
- SPORT_WRITE_DATA (W*S)
  Serial Port I/O Function: Outputs data to the specified port.
- SPORT_WRITE_LINE (W*S)
  Serial Port I/O Function: Outputs data, followed by a record terminator, to the specified port.