VOID
NdisIMRevertBack(
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_HANDLE SwitchHandle
);
NdisIMRevertBack returns the function of an intermediate driver to the context in which it was executing before it called NdisIMSwitchToMiniport.
Parameters
MiniportAdapterHandle
Specifies the handle input to MiniportInitialize.
SwitchHandle
Specifies the handle returned by the immediately preceding call to NdisIMSwitchToMiniport.
Comments
An intermediate driver should call NdisIMRevertBack as quickly as possible after a driver function makes a successful call to NdisIMSwitchToMiniport.
For example, after a successful call to NdisIMSwitchToMiniport, the ProtocolXxx function of an NDIS intermediate driver can safely call NdisMXxx functions commonly called from the MiniportHandleInterrupt or MiniportTimer functions of underlying NIC drivers. In particular, such a ProtocolXxx function can call NdisMXxx functions that indicate up to higher-level protocols bound to the intermediate driver’s virtual NIC.
Until it calls NdisIMRevertBack, the execution of such a ProtocolXxx function prevents other MiniportXxx functions in the same driver from running.
A call to NdisIMRevertBack without a SwitchHandle returned by a preceding call to NdisIMSwitchToMiniport is a fatal error.
Callers of NdisIMRevertBack are running at IRQL DISPATCH_LEVEL.
See Also
NdisIMQueueMiniportCallback, NdisIMSwitchToMiniport, NdisMArcIndicateReceive, NdisMEthIndicateReceive, NdisMFddiIndicateReceive, NdisMIndicateReceivePacket, NdisMIndicateStatus, NdisMTrIndicateReceive, ProtocolReceive, ProtocolReceivePacket, ProtocolStatus