EVT_SERCX_RECEIVE_CANCEL - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// sercx.h

EVT_SERCX_RECEIVE_CANCEL EvtSercxReceiveCancel;

VOID EvtSercxReceiveCancel(
  [in] WDFDEVICE Device
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-sercx-evt_sercx_receive_cancel)

EVT_SERCX_RECEIVE_CANCEL callback function

Description

The EvtSerCxReceiveCancel event callback function notifies the serial controller driver that the pending receive request is canceled.

Parameters

Device [in]

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

Remarks

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

To register an EvtSerCxReceiveCancel 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_RECEIVE_CANCEL(
    __in WDFDEVICE Device
    );

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

EVT_SERCX_RECEIVE_CANCEL MyEvtSerCxReceiveCancel;

Then, implement your callback function as follows.

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

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

See also

SerCxInitialize

SerCxProgressReceive