NdisMDeregisterIoPortRange function

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

Syntax


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

Parameters

MiniportAdapterHandle [in]

Specifies the handle input to MiniportInitializeEx.

InitialPort [in]

Specifies the bus-relative address of the first port in the range of ports.

NumberOfPorts [in]

Specifies the number of ports in the range.

PortOffset [in]

Specifies the mapped base port address returned by NdisMRegisterIoPortRange.

Return value

None

Remarks

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

NdisMDeregisterIoPortRange can be called from the MiniportInitializeEx or MiniportHaltEx functions only if MiniportInitializeEx 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 driver can no longer access the NIC's port range with calls to the NdisRaw..PortXxx functions.

Requirements

Target platform

Universal

Version

Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisMDeregisterIoPortRange (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisMDeregisterIoPortRange (NDIS 5.1)) in Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

PASSIVE_LEVEL

DDI compliance rules

Irql_Miniport_Driver_Function

See also

MiniportHaltEx
MiniportInitializeEx
NdisMRegisterIoPortRange

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft