As both a lowest- and highest-level driver, the system-supplied serial device driver has much in common with all kernel-mode device drivers and some features in common with file system drivers. That is, the serial driver handles interrupts and controls its hardware directly like any device driver. The serial driver, like a file system driver, also must provide Dispatch routines that handle requests about the nature of the file objects that represent its ports to user-mode applications.
Returns STATUS_SUCCESS if the serial port represented by the input device object is ready for I/O requests. If the driver is designed with pageable-image section(s), it maps in its code and sets up any resources it needs, such as internal buffers or queues, for handling subsequent I/O requests from the caller that is attempting to open the port. Then, it sets the I/O status block, completes the IRP, and returns. If the driver is resident, it simply sets the I/O status block, completes the IRP, and returns.
A user-mode application, protected subsystem, or another driver has made a request to open the serial port.
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to an error status returned by a support routine that the driver called to allocate necessary resources.
Cancels any IRPs currently queued to the serial port represented by the input device object. The next request for the device will be a close.
Any time following the successful completion of a create request and the receipt of additional requests for the target device object.
The current holder of the file object handle representing the serial port has canceled an I/O request, released its handle, or been terminated.
The Information field is set to zero. The Status field is set to STATUS_SUCCESS in the cleanup IRP, after the driver has completed all queued IRPs with their Status fields set to STATUS_CANCELLED.
Delays the close operation for an interval equal to ten send characters at the current line-control rate, disables interrupts from the device, lowers the hardware control lines, and resets the device. If the driver is designed with pageable-image section(s), it also releases any resources and mapped code it set up at the create request for the given device object.
Following a cleanup request for the same device object.
The Information field is set to zero and the Status field is set to STATUS_SUCCESS.
Returns end-of-file information (always set to zero) for the opened serial port to the buffer at Irp->AssociatedIrp.SystemBuffer.
Any time following the successful completion of a create request
The holder of a file handle, representing the opened serial port, has requested information about the length of the file.
The Information field is set to either sizeof(FILE_STANDARD_INFORMATION) or to sizeof(FILE_POSITION_INFORMATION) when the Status field is set to STATUS_SUCCESS. Otherwise, the Information field is set to zero, and the Status field is set to STATUS_INVALID_PARAMETER.
Sets the end-of-file information (always to zero) for the opened serial port.
Any time following the successful completion of a create request
The holder of a file handle, representing the opened serial port, has sent an EOF.
The Information field is set to zero. The Status field can be set to STATUS_SUCCESS or STATUS_INVALID_PARAMETER if the FileInformationClass value in the I/O stack location is not FileEndOfFileInformation.
Transfers characters from the device, which can be already held in the driver’s internal buffers, to the buffer at Irp->AssociatedIrp.SystemBuffer.
Any time following the successful completion of a create request
The current holder of the handle for the serial port requested receive data.
The Information field is set to the number of characters read when the Status field is set to STATUS_SUCCESS. Otherwise, the Information field is set to zero if the Status field is set to STATUS_PENDING or STATUS_CANCELLED.
Transfers characters from the buffer at Irp->AssociatedIrp.SystemBuffer to the device or, possibly, into the driver’s internal buffers first.
Any time following the successful completion of a create request
The current holder of the handle for the serial port sent a data-transmit request.
The Information field is set to the number of characters written when the Status field is set to STATUS_SUCCESS. Otherwise, the Information field is set to zero if the Status field is set to STATUS_PENDING or STATUS_CANCELLED.
Determined by the I/O control code set at Parameters.DeviceIoControl.IoControlCode in the driver’s I/O stack location of the IRP.
Any time following the successful completion of a create request
A Win32 application, VDM, or subsystem component has called DeviceIoControl to communicate a request to the serial driver.
The Status field value depends on the operation, either STATUS_SUCCESS or an appropriate STATUS_XXX value. For most operations, the set of possible STATUS_XXX values includes those propagated from a call to a support routine and/or those chosen by the driver designer. Usually, the Information field of the I/O status block is set to the number of bytes of returned or transferred data when the driver completes the IRP.