Share via


Registering an NDIS WAN Miniport Driver (NDIS 5.1)

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.

An NDIS WAN miniport driver calls the NdisMRegisterMiniport function in its DriverEntryfunction to register its MiniportXxx functions with NDIS. For more information about registering MiniportXxx functions, see Registering MiniportXxx Functions.

The call to NdisMRegisterMiniport provides an NDIS XXX_MINIPORT_CHARCTERISTICS structure to the miniport driver. To receive the correct structure; embed the appropriate compiler directives at the start of the miniport driver's source code, or set the appropriate build directives in the miniport driver's sources file. For more information about setting the NDIS version number, see Specifying the NDIS Version Number.

For an NDIS WAN miniport driver, the following compiler directives at the start of the miniport driver's source code indicate that the miniport driver uses a 4.0 NDIS_MINIPORT_CHARACTERISTICS structure:

#define NDIS_MINIPORT_DRIVER 
#define NDIS40_MINIPORT 1 
#include <ndis.h> // After preceding directives

If the NDIS40_MINIPORT directive is omitted, the NDIS WAN miniport driver uses a 3.0 NDIS_MINIPORT_CHARACTERISTICS structure. NDIS WAN drivers must indicate an NDIS version of 3.0 or 4.0.

 

 

Send comments about this topic to Microsoft