NDIS_STATUS
NdisIMInitializeDeviceInstance(
IN NDIS_HANDLE DriverHandle,
IN PNDIS_STRING DeviceInstance
);
NdisIMInitializeDeviceInstance calls an NDIS intermediate driver’s MiniportInitialize function to set up the driver’s virtual NIC for I/O operations on an underlying NIC driver to which the intermediate driver is bound.
NdisIMInitializeDeviceInstance propagates the status returned by the MiniportInitialize function.
An NDIS intermediate driver usually calls NdisIMInitializeDeviceInstance from its ProtocolBindAdapter function.
The driver’s installation script created the key designated by DeviceInstance in the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services registry tree.
Before it calls NdisIMInitializeDeviceInstance, ProtocolBindAdapter must make a successful call to NdisOpenAdapter, thereby binding the intermediate driver to the underlying NIC driver. Then, its subsequent call to NdisIMInitializeDeviceInstance allows the driver’s MiniportInitialize function to allocate any resources the driver needs to carry out network I/O operations and to initialize the driver’s virtual NIC, to which higher-level protocol drivers can bind themselves when the NDIS intermediate driver’s initialization is complete.
Callers of NdisIMInitializeDeviceInstance run at IRQL PASSIVE_LEVEL.
MiniportInitialize, NdisIMDeInitializeDeviceInstance, NdisIMRegisterLayeredMiniport, NdisInitializeString, NdisOpenAdapter, ProtocolBindAdapter