Partager via


NdisQueryPendingIoCount (Windows Embedded CE 6.0)

1/6/2010

This function requests the number of I/O operations that the specified adapter is currently processing.

Syntax

NDIS_STATUS NdisQueryPendingIoCount(
  PVOID NdisBindingHandle,
  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] Points 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. A zero count indicates that the specified adapter is not processing any I/O operations.

Return Value

The following table shows the return values for this function.

Value 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).

Requirements

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

See Also

Reference

NDIS Library Functions
NdisOpenAdapter
ProtocolPnPEvent