VOID
NdisMapFile(
OUT PNDIS_STATUS Status,
OUT PVOID *MappedBuffer,
IN NDIS_HANDLE FileHandle
);
NdisMapFile maps an already open file into a caller-accessible buffer if the file is currently unmapped.
NdisMapFile associates (maps) a virtual address range with an opened file so the driver can access the file contents. NdisMapFile allows only one mapping of a particular file to be outstanding at any time. Consequently, a successful caller is given exclusive access to the file data until NdisUnmapFile or NdisCloseFile is called.
A NIC driver can map and unmap such an open file as necessary, using alternating calls to NdisMapFile and NdisUnmapFile. A call to NdisCloseFile releases the FileHandle and deallocates the buffer containing the file contents.
A NIC driver can call NdisMapFile only during initialization.
Callers of NdisMapFile run at IRQL <= DISPATCH_LEVEL.
DriverEntry of NDIS Protocol Drivers, MiniportInitialize, NdisCloseFile, NdisOpenFile, NdisUnmapFile