The IOCTL_SERIAL_XOFF_COUNTER request sets an XOFF counter. An XOFF counter request supports clients that use software to emulate hardware handshake flow control.

An XOFF counter request is synchronized with write requests. The driver sends a specified XOFF character, and completes the request after one of the following events occurs:

  • A write request is received.
  • A timer expires (a time-out value is specified by the XOFF counter request).
  • The serial controller driver receives a number of characters that is greater than or equal to a count specified by the XOFF counter request.
For more information about the operation of an XOFF counter, see the description of the SERIAL_XOFF_COUNTER structure in the Ntddser.h header file in the Microsoft Windows Driver Kit (WDK).

Major code


Input buffer

The AssociatedIrp.SystemBuffer points to a client-allocated SERIAL_XOFF_COUNTER structure that is used to input XOFF counter information.

Input buffer length

The Parameters.DeviceIoControl.InputBufferLength is set to the size, in bytes, of a SERIAL_XOFF_COUNTER structure.

Output buffer


Output buffer length


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 or to one of the following request-specific values:


The count value specified for the XOFF counter request is less than zero.


The request timed out.


A write request was received.


Requirement Value
Header ntddser.h (include Ntddser.h)

See also