Bewerken

Delen via


NdisGeneratePartialCancelId function (ndis.h)

The NdisGeneratePartialCancelId function returns a value that the calling driver must use as the high-order byte of a cancellation ID.

Syntax

UCHAR NdisGeneratePartialCancelId();

Return value

NdisGeneratePartialCancelId returns a value that the calling driver uses as the high-order byte of a cancellation ID.

Remarks

Before marking send NET_BUFFER_LIST structures with cancellation IDs by calling the NDIS_SET_NET_BUFFER_LIST_CANCEL_ID macro, a driver should call NdisGeneratePartialCancelId one or more times. NdisGeneratePartialCancelId returns a value that the calling driver can use as the high-order byte of a cancellation ID. Prefixing a cancellation ID with the value returned by NdisGeneratePartialCancelId ensures that the cancellation ID will not be a duplicate of a cancellation ID assigned by another driver in the local computer.

Typically, an overlying driver calls NdisGeneratePartialCancelId one or more times during its initialization sequence and stores the returned value or values for later use. A protocol driver, for example, could call NdisGeneratePartialCancelId once for each client (such as DHCP or ARC) that it supports. The protocol driver can call the NdisCancelSendNetBufferLists function later to cancel a send request. In this case, NDIS calls the cancel send function (for example, MiniportCancelSend) of the underlying drivers.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisGeneratePartialCancelId (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisGeneratePartialCancelId (NDIS 5.1)) in Windows XP.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL <= DISPATCH_LEVEL
DDI compliance rules Irql_Miscellaneous_Function(ndis)

See also

MiniportCancelSend

NDIS_SET_NET_BUFFER_LIST_CANCEL_ID

NET_BUFFER_LIST

NdisCancelSendNetBufferLists