Handling the Port Activation PnP Event
Overlying drivers must handle the NetEventPortActivation PnP event when a miniport driver activates an NDIS port. NDIS does not initiate the binding between a protocol driver and miniport adapter until the default port has been activated. Therefore, protocol drivers should treat the call to their ProtocolBindAdapterEx function as a notification that the default port is active.
Protocol drivers must not use a port number in any NDIS requests unless the driver received notification that the port is active, either through the bind parameters or through the NetEventPortActivation PnP event.
NDIS generates a port activation PnP event after the miniport driver activates some ports. (Miniport drivers specify the NetEventPortActivation PnP event code in the NET_PNP_EVENT_NOTIFICATION structure that the NetPnPEvent parameter points to in the call to NdisMNetPnPEvent to activate NDIS ports.)
Miniport drivers can indicate the activation of multiple ports in one PnP notification by using the Next member in an NDIS_PORT structure to link multiple NDIS_PORT structures. For more information about the linked list of NDIS_PORT structures, see Activating NDIS Ports.
NDIS generates a NetEventPortDeactivation PnP event to the bound protocol drivers when a miniport deactivates some ports. For more information about the NetEventPortDeactivation PnP event, see Handling the Port Deactivation PnP Event.