MiniportCheckForHang (Windows CE 5.0)

Send Feedback

This function is an optional function that reports the state of the network adapter or monitors the responsiveness of an underlying device driver.

BOOLEAN MiniportCheckForHang(NDIS_HANDLEMiniportAdapterContext);

Parameters

  • MiniportAdapterContext
    [in] Specifies the handle to a miniport-allocated context area in which the driver maintains per-network adapter state, set up by MiniportInitialize.

Return Values

MiniportCheckForHang returns TRUE if the driver determines that its network adapter is not operating or if an intermediate driver determines that the underlying device driver is unresponsive.

Remarks

In network adapter drivers, MiniportCheckForHang does nothing more than check the internal state of the network adapter and return TRUE if it detects that the network adapter is not operating correctly.

In intermediate drivers, MiniportCheckForHang can periodically check the state of the driver's virtual network adapter to determine whether the underlying device driver appears to be hung.

By default, the NDIS library calls MiniportCheckForHang approximately every two seconds.

If MiniportCheckForHang returns TRUE, NDIS then calls the driver's MiniportReset function.

If a network adapter driver has no MiniportCheckForHang function and NDIS judges the driver unresponsive as, for example, when NDIS holds many pending sends and requests queued to the miniport for a time-out interval, NDIS calls the driver's MiniportReset function. The NDIS library's default time-out interval for queued sends and requests is around four seconds. However, a network adapter driver's MiniportInitialize function can extend the NDIS time-out interval by calling NdisMSetAttributesEx from MiniportInitialize to avoid unnecessary resets.

The MiniportInitialize function of an intermediate driver should disable NDIS's time-out interval with NdisMSetAttributesEx because such a driver can neither control nor estimate a reasonable completion interval for the underlying device driver.

MiniportCheckForHang can be pre-empted by an interrupt.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Externs.h.

See Also

MiniportInitialize | MiniportReset | NdisMSetAttributesEx

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.