Compartir a través de


IRP_MJ_WRITE (Serial)

An IRP_MJ_WRITE request transfers data from a client to a serial device.

When Sent

A client uses a write request whenever it writes data to a serial device.

Input Parameters

The Parameters.Write.Length member is set to the number of bytes to copy from a client-allocated write buffer to a serial device.

The AssociatedIrp.SystemBuffer member points to a client-allocated write buffer from which Serial copies data to the serial device.

Output Parameters

None.

I/O Status Block

The Information member is set to the number of bytes actually copied from the client's write buffer to the serial device.

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 total time allowed for the write request was exceeded.

Operation

A client can use time-out events to terminate a write request. Note, however, that when a serial device is opened, the time-out events set on a 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) and 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_READ (Serial)

 

 

Send comments about this topic to Microsoft