다음을 통해 공유


IRP_MJ_READ (Serial)

A IRP_MJ_READ request transfers data from a serial device to a client.

When Sent

A client uses a read request whenever it reads data on a serial device.

Input Parameters

The Parameters.Read.Length member is set to the number of bytes to transfer to the client's read buffer.

Output Parameters

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:

  • STATUS_SUCCESS
    The request completed successfully.

  • STATUS_CANCELLED
    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.

  • STATUS_DELETE_PENDING
    Serial is in the process of removing the device.

  • STATUS_PENDING
    Serial queued the request for later processing.

  • STATUS_TIMEOUT
    The time to complete the request exceeded the total time-out value or the interval time-out value.

Operation

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.

Requirements

Header

Wdm.h (include Wdm.h or Ntddk.h)

See also

IRP_MJ_WRITE (Serial)

 

 

Send comments about this topic to Microsoft