Windows Driver Kit: Serial Devices
IOCTL_SERIAL_SET_LINE_CONTROL
Operation
The IOCTL_SERIAL_SET_LINE_CONTROL request sets the line control register (LCR). The line control register controls the data size, the number of stop bits, and the parity.
To obtain the value of the line control register, a client can use an IOCTL_SERIAL_GET_LINE_CONTROL request.
For information about valid line control register settings, see the constants SERIAL_5_DATA through SERIAL_PARITY_MASK, which are defined in the header file \src\kernel\serial\serial.h in the Microsoft Windows Driver Kit (WDK).
Input
The AssociatedIrp.SystemBuffer points to a client-allocated SERIAL_LINE_CONTROL structure that is used to input line control information.
The Parameters.DeviceIoControl.InputBufferLength is set to the size in bytes of a SERIAL_LINE_CONTROL structure.
Output
None.
I/O Status Block
The Information member is set to zero.
The Status member is set to one of the Generic Status Values for Serial Device Control Requests. A status of STATUS_INVALID_PARAMETER indicates that the specified line control information is not valid.
Requirements
Headers: Defined in ntddser.h. Include ntddser.h.
See Also
IOCTL_SERIAL_GET_LINE_CONTROL