EVT_SERCX_TRANSMIT_CANCEL callback function (sercx.h)

The EvtSerCxTransmitCancel event callback function notifies the serial controller driver that the pending transmit request is canceled.

Syntax

EVT_SERCX_TRANSMIT_CANCEL EvtSercxTransmitCancel;

void EvtSercxTransmitCancel(
  [in] WDFDEVICE Device
)
{...}

Parameters

[in] Device

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

Return value

None

Remarks

The serial framework extension (SerCx) calls this function to inform the serial controller driver that the current transmit request has been canceled. If the driver has an outstanding transmit operation in progress, the driver should cancel this operation and call the SerCxProgressTransmit method to report the cancellation. In the SerCxProgressTransmit call, set BytesTransmitted to the number of bytes transmitted before the operation was canceled, and set TransmitStatus to SerCxStatusCancelled.

To register an EvtSerCxTransmitCancel callback function, the driver must call the SerCxInitialize method.

Examples

The function type for this callback is declared in Sercx.h, as follows.

typedef VOID
  EVT_SERCX_TRANSMIT_CANCEL(
    __in WDFDEVICE Device
    );

To define an EvtSerCxTransmitCancel callback function that is named MyEvtSerCxTransmitCancel, you must first provide a function declaration that Static Driver Verifier (SDV) and other verification tools require, as follows.

EVT_SERCX_TRANSMIT_CANCEL MyEvtSerCxTransmitCancel;

Then, implement your callback function as follows.

VOID
  MyEvtSerCxTransmitCancel(
    __in WDFDEVICE Device
    )
{ ... }

For more information about SDV requirements for function declarations, see Declaring Functions Using Function Role Types for KMDF Drivers.

Requirements

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