[This is preliminary documentation and subject to change.]
The UnmapViewOfFileVlm function unmaps a mapped view of a file from the calling process's address space.
BOOL UnmapViewOfFileVlm(
PVOID64 lpBaseAddress // address of region to be unmapped
);
If the function succeeds, the return value is nonzero, and all dirty (modified) pages within the specified range are written to disk. The write operation is performed through the usual lazy writing provided by Windows NT.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Although an application may close the file handle used to create a file mapping object prior to unmapping a view, the operating system holds the corresponding file open until the last view of the file is unmapped.
Closed files for which the last view has not yet been unmapped are held open with no sharing restrictions. This situation risks corruption of data, so it should be avoided.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Memory Management Overview, Memory Management Functions, Very Large Memory (VLM), MapViewOfFileVlm, MapViewOfFileEx