Share via


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

NdisMPromoteMiniport promotes a secondary miniport driver adapter to the primary role after the primary miniport driver adapter is removed from the system.

Note   This function is intended to be used in NDIS 5.1 and earlier drivers and should not be used with later drivers.

 

Syntax

NDIS_STATUS NdisMPromoteMiniport(
  _In_ NDIS_HANDLE MiniportAdapterHandle
);

Parameters

  • MiniportAdapterHandle [in]
    Specifies the handle to the initialized adapter. The miniport driver previously called the NdisMSetMiniportSecondary function to set this miniport driver adapter to a secondary role.

Return value

NdisMPromoteMiniport can return either of the following:

Return code Description
NDIS_STATUS_SUCCESS

The secondary miniport driver adapter has been promoted to the primary role.

NDIS_STATUS_FAILURE

An attempt to promote the secondary miniport driver adapter to the primary role failed.

 

Remarks

A miniport driver can call NdisMPromoteMiniport, after the primary miniport driver adapter is removed from the system, to set a secondary miniport driver adapter to the primary role. In this call, the miniport driver passes the handle to a secondary miniport driver adapter. The miniport driver must have previously called the NdisMSetMiniportSecondary function to set this miniport driver adapter to a secondary role.

A miniport driver uses 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 the NdisMRemoveMiniport function to remove the primary adapter from the system and from the miniport driver's bundle. The miniport driver can then call NdisMPromoteMiniport 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 NdisMSetMiniportSecondary 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).

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

NdisMRemoveMiniport

NdisMSetMiniportSecondary

 

 

Send comments about this topic to Microsoft