Microsoft Windows CE 3.0  

MiniportCheckForHang

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

BOOLEAN
MiniportCheckForHang(
IN NDIS_HANDLE
MiniportAdapterContext
);

Parameters

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

Return Values

MiniportCheckForHangreturns 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.

Comments

In network adapter drivers, MiniportCheckForHangdoes 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, MiniportCheckForHangcan 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 MiniportCheckForHangapproximately every two seconds.

If MiniportCheckForHangreturns TRUE, NDIS then calls the driver's MiniportResetfunction.

If a network adapter driver has no MiniportCheckForHangfunction 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 MiniportResetfunction. The NDIS library's default time-out interval for queued sends and requests is around four seconds. However, a network adapter driver's MiniportInitializefunction can extend NDIS's time-out interval by calling NdisMSetAttributesEXfrom MiniportInitializeto avoid unnecessary resets.

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

MiniportCheckForHangcan be pre-empted by an interrupt.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h   Ndislib.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MiniportInitialize, MiniportReset, NdisMSetAttributesEX