Starting a Driver Stack
After the system detects a networking device, the system starts an NDIS driver stack for the device. The device can be a virtual device or a physical device. In either case, a driver stack start operation proceeds as follows:
The system loads and initializes the drivers if they are not already loaded.
It does not load the drivers in any particular order.
The system calls each driver's DriverEntry function.
After DriverEntry returns:
- The miniport adapter for the device is in the Halted state.
- The filter modules are in the Detached state.
- The protocol binding is in the Unbound state.
The system requests NDIS to start the miniport adapter.
To initialize the miniport adapter, NDIS calls the miniport driver's MiniportInitializeEx function. If MiniportInitializeEx is successful, the miniport adapter enters the Paused state.
NDIS attaches the filter modules, beginning with the module that is closest to the miniport driver and progressing to the top of the driver stack.
To request the driver to attach a filter module to the driver stack, NDIS calls a filter driver's FilterAttach function. If each attach operation is successful, the filter module enters the Paused state.
After all the underlying drivers are in the Paused state, NDIS calls the protocol driver's ProtocolBindAdapterEx function.
Then the protocol driver binding enters the Opening state. The protocol driver calls the NdisOpenAdapterEx function to open the binding with the miniport adapter.
NDIS allocates the necessary resources for the binding and calls the protocol driver's ProtocolOpenAdapterCompleteEx function.
The binding enters the Paused state.
To complete the bind operation, the protocol driver calls the NdisCompleteBindAdapterEx function.
NDIS restarts the driver stack. For more information about restarting the driver stack, see Restarting a Driver Stack.