NdisMDeregisterIoPortRange

VOID
    NdisMDeregisterIoPortRange(
        IN NDIS_HANDLE
 MiniportAdapterHandle,
        IN UINT InitialPort,
        IN UINT NumberOfPorts,
        IN PVOID PortOffset
        );

NdisMDeregisterIoPortRange releases a mapping that was set up with NdisMRegisterIoPortRange during driver initialization.

Parameters

MiniportAdapterHandle
Specifies the handle input to MiniportInitialize.
InitialPort
Specifies the bus-relative address of the first port in the range of ports.
NumberOfPorts
Specifies the number of ports in the range.
PortOffset
Specifies the mapped base port address returned by NdisMRegisterIoPortRange.

Comments

The miniport must pass the same InitialPort and NumberOfPorts to NdisMDeregisterIoPortRange that were passed when MiniportInitialize called NdisMRegisterIoPortRange to get the mapped PortOffset value. That is, a miniport cannot call NdisMDeregisterIoPortRange to release a subrange of a mapped port range.

NdisMDeregisterIoPortRange can be called from the MiniportInitialize or MiniportHalt functions only if MiniportInitialize previously made a successful call to NdisMRegisterIoPortRange.

NdisMDeregisterIoPortRange also releases the driver’s claim on the I/O port range in the registry.

After it calls NdisMRegisterIoPortRange, the miniport can no longer access the NIC’s port range with calls to the NdisRaw..PortXxx functions.

Callers of NdisMDeregisterIoPortRange run at IRQL PASSIVE_LEVEL.

See Also

MiniportHalt, MiniportInitialize, NdisMRegisterIoPortRange