Compartir a través de


NdisQueryPendingIOCount function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

A protocol driver or intermediate driver calls NdisQueryPendingIOCount to request the number of input and output (I/O) operations that the specified adapter is currently processing.

Syntax

NDIS_STATUS NdisQueryPendingIOCount(
  _In_  PVOID  NdisBindingHandle,
  _Out_ PULONG IoCount
);

Parameters

  • NdisBindingHandle [in]
    Specifies the handle returned by NdisOpenAdapter that identifies the target NIC or the virtual adapter of the next-lower driver to which the caller is bound.

  • IoCount [out]
    Pointer to a caller-supplied variable into which NDIS writes the number of outstanding I/O operations. I/O operations include sending packets and requests to set or retrieve information maintained by the specified adapter's miniport driver. A zero count indicates that the specified adapter is not processing any I/O operations.

Return value

Returns one of the following values:

Return code Description
NDIS_STATUS_SUCCESS

The driver successfully returned the number of outstanding I/O operations.

NDIS_STATUS_CLOSING

The binding specified by NdisBindingHandle is being released.

NDIS_STATUS_FAILURE

The binding handle specified by NdisBindingHandle is invalid.

 

Remarks

A protocol driver can call NdisQueryPendingIOCount from its ProtocolPnPEvent function when handling a transition to low-power state to determine when the protocol can safely return from its ProtocolPnPEvent function. When the number of outstanding I/O operations drops to zero, the protocol driver can return from its ProtocolPnPEvent function without inadvertently causing any outstanding I/O operations to be aborted.

Note that, during the call to NdisQueryPendingIOCount, the protocol driver must not request that the adapter identified by NdisBindingHandle perform any new I/O operations (sends or information requests).

System support for NdisQueryPendingIOCount is available in Windows XP and later versions.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

NET_PNP_EVENT for Protocol Drivers

NdisCompletePnPEvent

ProtocolPnPEvent

 

 

Send comments about this topic to Microsoft