An NDIS intermediate driver calls the NdisIMInitializeDeviceInstance function to initiate the initialization operation for a virtual NIC.
NDIS_STATUS
NdisIMInitializeDeviceInstance(
IN NDIS_HANDLE DriverHandle,
IN PNDIS_STRING DeviceInstance
);
NdisIMInitializeDeviceInstanceEx can return either of the following:
Declared in Ndis.h. Include Ndis.h.
An NDIS intermediate driver usually calls NdisIMInitializeDeviceInstance or NdisIMInitializeDeviceInstanceEx from its ProtocolBindAdapter function.
Before it calls NdisIMInitializeDeviceInstance, ProtocolBindAdapter should bind the intermediate driver to any underlying NIC drivers that the intermediate driver requires to function. 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.
Before NDIS calls an intermediate driver’s MiniportInitialize function, the driver can call NdisIMCancelInitializeDeviceInstance to cancel the initialization operation.
After NDIS calls an intermediate driver’s MiniportInitialize function, the driver must call NdisIMDeInitializeDeviceInstance to reverse the initialization operation.
Callers of NdisIMInitializeDeviceInstance run at IRQL = PASSIVE_LEVEL.
ANSI_STRING, MiniportInitialize, NdisIMCancelInitializeDeviceInstance, NdisIMDeInitializeDeviceInstance, NdisIMInitializeDeviceInstanceEx, NdisIMRegisterLayeredMiniport, NdisInitializeString, NdisOpenAdapter, ProtocolBindAdapter, UNICODE_STRING