Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.34 KB

UnmapViewOfFile.md

File metadata and controls

51 lines (33 loc) · 1.34 KB

Home

Function name : UnmapViewOfFile

Group: File Mapping - Library: kernel32


The UnmapViewOfFile function unmaps a mapped view of a file from the calling process"s address space.


Code examples:

Using File Mapping for enumerating files opened by Visual FoxPro
Using shared memory to exchange data between applications (processes)

Declaration:

BOOL UnmapViewOfFile(
  LPCVOID lpBaseAddress
);
  

FoxPro declaration:

DECLARE INTEGER UnmapViewOfFile IN kernel32;
	LONG lpBaseAddress  

Parameters:

lpBaseAddress [in] Pointer to the base address of the mapped view of a file that is to be unmapped.


Return value:

If the function succeeds, the return value is nonzero, and all dirty pages within the specified range are written "lazily" to disk.


Comments:

Although an application may close the file handle used to create a file mapping object, the system holds the corresponding file open until the last view of the file is unmapped.

See also: MapViewOfFile, MapViewOfFileEx.