NdisUnmapFile function (ndis.h)

The NdisUnmapFile function releases a virtual address mapping of a file previously set up with the NdisMapFile function.

Syntax

void NdisUnmapFile(
  [in] NDIS_HANDLE FileHandle
);

Parameters

[in] FileHandle

The handle that was returned by the NdisOpenFile function.

Return value

None

Remarks

To reduce resource usage, a miniport driver should always call NdisUnmapFile when it no longer needs exclusive access to the contents of a file that it opened. Such a driver can map and unmap the file as necessary, using alternating calls to NdisMapFile and NdisUnmapFile until it releases the file handle with the NdisCloseFile function.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisUnmapFile (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisUnmapFile (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_Miscellaneous_Function(ndis)

See also

MiniportInitializeEx

NdisCloseFile

NdisMapFile

NdisOpenFile