Miniport Driver Adapter Context (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.
NDIS uses a software object called a logical adapter to represent each NIC in the system. This object is maintained by NDIS and is opaque to the miniport driver and to protocol drivers. NDIS passes a handle to this structure to the NIC driver's MiniportInitializefunction. The miniport driver subsequently supplies this handle in all calls to NdisXxx functions that pertain to the NIC designated by the handle.
When a miniport driver is called to initialize a NIC it manages, it creates its own internal data structure to represent the NIC. The driver uses this structure, referred to as the miniport driver adapter context, to maintain device-specific state information it needs to manage the NIC. The driver passes a handle to this structure to NDIS when its MiniportInitializefunction calls NdisMSetAttributesor NdisMSetAttributesEx. When NDIS calls one of the miniport driver's MiniportXxx functions that pertains to the NIC, it passes this handle to identify the correct NIC to the driver. The miniport driver adapter context is owned and maintained by the miniport driver and is opaque to NDIS and to protocol drivers.