NdisMUnmapIoSpace function (ndis.h)

NdisMUnmapIoSpace releases a virtual range mapped by an initialization-time call to NdisMMapIoSpace.

Syntax

void NdisMUnmapIoSpace(
  [in] NDIS_HANDLE MiniportAdapterHandle,
  [in] PVOID       VirtualAddress,
  [in] UINT        Length
);

Parameters

[in] MiniportAdapterHandle

Specifies the handle originally input to MiniportInitializeEx.

[in] VirtualAddress

Specifies the base virtual address for the mapped range that was returned by NdisMMapIoSpace.

[in] Length

Specifies the number of bytes in the range that was mapped with NdisMMapIoSpace.

Return value

None

Remarks

When a miniport driver is unloading, any memory range that it mapped during initialization with NdisMMapIoSpace must be released with a call to NdisMUnmapIoSpace.

The Length passed to NdisMUnmapIoSpace must match the Length originally passed to NdisMMapIoSpace.

NdisMUnmapIoSpace can be called only from a miniport driver's MiniportInitializeEx and MiniportHaltEx functions.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisMUnmapIoSpace (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisMUnmapIoSpace (NDIS 5.1)) in Windows XP.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_Miniport_Driver_Function(ndis)

See also

MiniportHaltEx

MiniportInitializeEx

NdisMMapIoSpace