IOCTL_SERIAL_SET_LINE_CONTROL control code
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.
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.
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.