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:ndis.MINIPORT_CANCEL_SEND |
MINIPORT_CANCEL_SEND (ndis.h) |
NDIS calls a miniport driver's MiniportCancelSend function to cancel the transmission of all NET_BUFFER_LIST structures that are marked with a specified cancellation identifier. |
netvista\miniportcancelsend.htm |
netvista |
05/02/2018 |
|
MINIPORT_CANCEL_SEND, MINIPORT_CANCEL_SEND callback, MiniportCancelSend, MiniportCancelSend callback function [Network Drivers Starting with Windows Vista], ndis/MiniportCancelSend, ndis_sendrcv_ref_86f1ff8c-c68b-49e3-8d77-883d7e055961.xml, netvista.miniportcancelsend |
ndis.h |
Ndis.h |
Windows |
Supported in NDIS 6.0 and later. |
<= DISPATCH_LEVEL |
Windows |
|
|
|
|
|
NDIS calls a miniport driver's MiniportCancelSend function to cancel the transmission of all NET_BUFFER_LIST structures that are marked with a specified cancellation identifier.
A handle to a context area that the miniport driver allocated in its MiniportInitializeEx function. The miniport driver uses this context area to maintain state information about an adapter.
A cancellation identifier. This identifier specifies the NET_BUFFER_LIST structures that are being canceled.
Miniport drivers and intermediate drivers that queue send NET_BUFFER_LIST structures export a MiniportCancelSend function. The MiniportCancelSend function cancels the pending transmission of the specified NET_BUFFER_LIST structures.
When an overlying NDIS driver calls the NdisCancelSendNetBufferLists function, NDIS calls the MiniportCancelSend function of the appropriate lower-level driver on the binding. NDIS makes this call only if the lower-level driver exports a MiniportCancelSend function.
A miniport driver's MiniportCancelSend function performs the following operations:
- Traverses its list of queued NET_BUFFER_LIST structures for the specified adapter and calls the NDIS_GET_NET_BUFFER_LIST_CANCEL_ID macro to obtain the cancellation identifier for each queued NET_BUFFER_LIST structure. The miniport driver compares the cancellation identifier that NDIS_GET_NET_BUFFER_LIST_CANCEL_ID returns with the cancellation identifier that NDIS passed to MiniportCancelSend.
- Removes from the send queue (un-links) all NET_BUFFER_LIST structures whose cancellation identifiers match the specified cancellation identifier.
- Calls the NdisMSendNetBufferListsComplete function for all unlinked NET_BUFFER_LIST structures to return the structures .The miniport driver sets the status field of the NET_BUFFER_LIST structures to NDIS_STATUS_SEND_ABORTED.
- Performs the operations in the preceding list for a miniport driver's MiniportCancelSend function.
- Calls the NdisCancelSendNetBufferLists function, specifying the binding that maps to the adapter that NDIS specified in the call to MiniportCancelSend.
For example, to define a MiniportCancelSend function that is named "MyCancelSend", use the MINIPORT_CANCEL_SEND type as shown in this code example:
MINIPORT_CANCEL_SEND MyCancelSend;
Then, implement your function as follows:
_Use_decl_annotations_
VOID
MyCancelSend(
NDIS_HANDLE MiniportAdapterContext,
PVOID CancelId
)
{...}
The MINIPORT_CANCEL_SEND function type is defined in the Ndis.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the Use_decl_annotations annotation to your function definition. The Use_decl_annotations annotation ensures that the annotations that are applied to the MINIPORT_CANCEL_SEND function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for NDIS Drivers.
For information about Use_decl_annotations, see Annotating Function Behavior.
NDIS_GET_NET_BUFFER_LIST_CANCEL_ID NdisMSendNetBufferListsComplete