SerCxCompleteWait function (sercx.h)

The SerCxCompleteWait method notifies the serial framework extension (SerCx) that an event in the current wait mask has occurred.

Syntax

NTSTATUS SerCxCompleteWait(
  [in] WDFDEVICE Device,
  [in] ULONG     Event
);

Parameters

[in] Device

A WDFDEVICE handle to the framework device object that represents the serial controller.

[in] Event

The type of event that is ending the current wait operation. This parameter is a wait mask value. Each event type corresponds to a particular bit in the wait mask. This bit is set to indicate that the corresponding event has occurred. For more information about the types of events that can be specified by a wait mask, see SERIAL_EV_XXX.

Return value

SerCxCompleteWait returns STATUS_SUCCESS if the call is successful. Possible error return values include the following status code.

Return code Description
STATUS_INVALID_PARAMETER
The specified event is not included in the current wait mask.

Remarks

When SerCx receives an IOCTL_SERIAL_SET_WAIT_MASK request from a client, the request handler in SerCx calls the EvtSerCxWaitmask callback function to notify the serial controller driver that the wait mask has changed. The wait mask specifies a set of hardware events for the serial controller to monitor. During this call, the driver discards any old wait mask that might have been specified in a previous EvtSerCxWaitmask call, and then configures the serial controller hardware to detect the events in the new wait mask.

Later, when an event in the new wait mask occurs, the driver calls SerCxCompleteWait to notify SerCx of the event. If a previously sent IOCTL_SERIAL_WAIT_ON_MASK request is pending, SerCxCompleteWait completes this request with a status of STATUS_SUCCESS and an output wait mask that indicates which event occurred. Otherwise, SerCxCompleteWait stores the event in its internal event history in anticipation of a future IOCTL_SERIAL_WAIT_ON_MASK request.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 8.
Target Platform Universal
Header sercx.h
IRQL <= DISPATCH_LEVEL

See also

EvtSerCxWaitmask

IOCTL_SERIAL_SET_WAIT_MASK

IOCTL_SERIAL_WAIT_ON_MASK

SERIAL_EV_XXX

SerCxGetWaitMask