Share via


IRP_MJ_READ (Parallel Device)

The IRP_MJ_READ request obtains input data from a parallel device.

When Sent

A client uses an IRP_MJ_READ request to obtain input from a parallel device.

Input Parameters

The Parameters.Read.Length member points to the number of bytes to read from the parallel device.

Output Parameters

The AssociatedIrp.SystemBuffer member points to a read buffer that the client allocates for the read data. The buffer must be large enough to hold the requested number of bytes.

I/O Status Block

The Information member is set to the number of bytes actually read from the parallel device.

The Status member is set to one of the following status values:

  • STATUS_SUCCESS
    The request completed successfully.

  • STATUS_DELETE_PENDING
    The device is in the process of being removed.

  • STATUS_CANCELLED
    The request was canceled.

  • STATUS_PENDING
    The request is queued on a work queue for the parallel device.

  • STATUS_INVALID_PARAMETER
    The Parameters.Write.ByteOffset member is not zero. Note that both read and write requests use this member.

  • STATUS_DEVICE_REMOVED
    The device has been removed.

Operation

The system-supplied bus driver for parallel ports uses the read protocol set for the parallel device. The default read protocol is NIBBLE_MODE. A client can negotiate a read protocol by using an IOCTL_IEEE1284_NEGOTIATE request.

The parallel port bus driver sets a cancel routine for the read request, marks the read request as pending, and queues the read request on a work queue. The read request is held in the work queue in a state that can be canceled until the read request is either completed or canceled by the client.

For more information, see Reading and Writing a Parallel Device.

Requirements

Header

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

See also

IRP_MJ_WRITE

IRP_MJ_WRITE (Parallel Device)

IOCTL_IEEE1284_NEGOTIATE

PPARALLEL_READ

PPARALLEL_WRITE

 

 

Send comments about this topic to Microsoft