An IRP_MJ_WRITE request transfers data from a client to a serial device.
A client uses a write request whenever it writes data to a serial device.
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.
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:
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 total time allowed for the write request was exceeded.
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.
|Wdm.h (include Wdm.h or Ntddk.h)|