This documentation is archived and is not being maintained.

NdisMRemoveMiniport (NDIS 5.1) 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.

NdisMRemoveMiniport removes the specified miniport driver adapter that the miniport driver has determined is unrecoverable from the system.


NDIS_STATUS NdisMRemoveMiniport(
  _In_ NDIS_HANDLE MiniportAdapterHandle


MiniportAdapterHandle [in]

Specifies the handle to the initialized adapter that the miniport driver has determined is unrecoverable.

Return value

NdisMRemoveMiniport can return either of the following:

Return codeDescription

The miniport driver adapter has been removed.


An attempt to remove the miniport driver adapter failed.



If a miniport driver has determined that a particular miniport driver adapter has failed and is unrecoverable, the miniport driver can call NdisMRemoveMiniport to remove the adapter from the system. In this call, the miniport driver passes the handle to the adapter to remove.

A miniport driver can use a bundle of miniport driver adapters to balance the work load that each miniport driver adapter carries and to enable a secondary miniport driver adapter to take over packet transfers and information requests if the primary miniport driver adapter fails. This capability is called load balancing and failover (LBFO). For example, if the miniport driver's primary adapter fails, the miniport driver can call NdisMRemoveMiniport to remove the primary adapter from the system and from the miniport driver's bundle. The miniport driver can then call the NdisMPromoteMiniport function to promote a secondary adapter to the primary role.

The first miniport driver adapter that the miniport driver initialized is initially the primary miniport driver adapter. The primary miniport driver adapter handles all packet transfers and requests for information. A miniport driver can call the NdisMSetMiniportSecondary function during the subsequent initialization of several miniport driver adapters to set them all to secondary roles. That is, multiple secondary miniport driver adapters can exist in a bundle.

For information about adding LBFO capability to a miniport driver, see the readme for the passthru driver. This miniport driver is a sample intermediate miniport driver in the Microsoft Windows Driver Development Kit (DDK) and the Windows Driver Kit (WDK).


Target platform



See NdisMRemoveMiniport.


Ndis.h (include Ndis.h)





See also




Send comments about this topic to Microsoft