Skip to content

Latest commit

 

History

History
97 lines (72 loc) · 3.35 KB

nc-sercx-evt_sercx_transmit_cancel.md

File metadata and controls

97 lines (72 loc) · 3.35 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:sercx.EVT_SERCX_TRANSMIT_CANCEL
EVT_SERCX_TRANSMIT_CANCEL (sercx.h)
The EvtSerCxTransmitCancel event callback function notifies the serial controller driver that the pending transmit request is canceled.
serports\evtsercxtransmitcancel.htm
serports
04/23/2018
EVT_SERCX_TRANSMIT_CANCEL callback function
1/EvtSerCxTransmitCancel, EVT_SERCX_TRANSMIT_CANCEL, EVT_SERCX_TRANSMIT_CANCEL callback, EvtSerCxTransmitCancel, EvtSerCxTransmitCancel callback function [Serial Ports], serports.evtsercxtransmitcancel
sercx.h
Desktop
Available starting with Windows 8.
Called at IRQL <= DISPATCH_LEVEL
Windows
EVT_SERCX_TRANSMIT_CANCEL
sercx/EVT_SERCX_TRANSMIT_CANCEL
APIRef
kbSyntax
UserDefined
1.0\Sercx.h
EVT_SERCX_TRANSMIT_CANCEL

EVT_SERCX_TRANSMIT_CANCEL callback function

-description

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

-parameters

-param 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 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.