A IRP_MJ_READ request transfers data from a serial device to a client.
A client uses a read request whenever it reads data on a serial device.
The Parameters.Read.Length member is set to the number of bytes to transfer to the client's read buffer.
The AssociatedIrp.SystemBuffer member points to a client-allocated read buffer to which Serial copies data read on the serial device.
I/O Status Block
The Information member is set to the number of bytes transferred to the client's read buffer.
The Status member is set to one of the following values:
The request completed successfully.
A client canceled the request. Serial also cancels a request if a device error occurs and Serial is configured to cancel a request if there is a device error.
Serial is in the process of removing the device.
Serial queued the request for later processing.
The time to complete the request exceeded the total time-out value or the interval time-out value.
A client can use time-out events to terminate a read request. Note, however, that when a serial device is opened, the time-out settings for the device are undefined. A kernel-mode client can use an IOCTL_SERIAL_INTERNAL_BASIC_SETTINGS to set time-out parameters to zero (no time-out events are used). User-mode and kernel-mode clients can use an IOCTL_SERIAL_SET_TIMEOUTS request to set time-out parameters.
For more information about read and write time-outs, see Setting Read and Write Timeouts for a Serial Device.