IOCTL_SERIAL_GET_WAIT_MASK control code
The IOCTL_SERIAL_GET_WAIT_MASK request returns the event wait mask that is currently set for the serial controller.
A client can wait for the wait events represented by flag bits SERIAL_EV_RXCHAR through SERIAL_EV_EVENT2. For more information about these event flags, see SERIAL_EV_XXX.
The Parameters.DeviceIoControl.OutputBufferLength member is set to the size, in bytes, of a ULONG.
The AssociatedIrp.SystemBuffer member points to a client-allocated ULONG buffer that the serial controller driver uses to output the wait mask. The wait mask is either zero or the bitwise-OR of one or more of the SERIAL_EV_XXX event flags.
If the request is successful, the Information member is set to the size, in bytes, of a ULONG. Otherwise, the Information member is set to zero.
The Status member is set to one of the Generic Status Values for Serial Device Control Requests.