Поделиться через


NdisCancelSendPackets (Windows Embedded CE 6.0)

1/6/2010

This function cancels transmission of all packets marked with the specified cancellation identifier on the miniport identified by the binding handle.

Syntax

VOID NdisCancelSendPackets(
  NDIS_HANDLE NdisBindingHandle,
  ULONG_PTR CancelId
);

Parameters

  • NdisBindingHandle
    [in] Specifies the handle returned by NdisOpenAdapter that identifies the network interface card (NIC) or virtual adapter to which the cancellation applies.
  • CancelId
    [in] The cancellation identifier. This identifier specifies the packet or group of packets for which transmission is being canceled.

Return Value

None.

Remarks

The NdisCancelSendPackets function cancels packet transmissions on a single binding. To cancel packet transmissions on more than one binding, a protocol or intermediate driver must call the NdisCancelSendPackets function once for each binding.

The protocol or intermediate driver must ensure that NdisBindingHandle, which represents the driver's binding to the adapter, remains valid for the duration of the call to NdisCancelSendPackets. That is, the protocol or intermediate driver must not call the NdisCloseAdapter function to close the binding before NdisCancelSendPackets returns.

There is no guarantee that calling NdisCancelSendPackets will cancel the pending transmission of all packets with the specified cancellation identifier. For example, if the next-lower driver to which the protocol or intermediate driver is bound does not provide a MiniportCancelSendPackets function, a call to NdisCancelSendPackets does nothing.

In all cases, packets submitted for transmission are returned to the originating protocol or intermediate driver through a call to the driver's ProtocolSendComplete function. Canceled send packets are returned with a completion status of NDIS_STATUS_ABORTED. The delay between calling NdisCancelSendPackets and the return of the canceled packets can vary and therefore cannot be exactly specified.

Requirements

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
MiniportCancelSendPackets
NDIS_GET_PACKET_CANCEL_ID
NdisCloseAdapter
NdisGeneratePartialCancelId
NdisOpenAdapter
ProtocolSendComplete