Using Win32 functions in Visual FoxPro Image Gallery
File Mapping
..msdn
CreateFileMapping
GetMappedFileName
MapViewOfFile
UnmapViewOfFile
Code examples:
Using File Mapping for enumerating files opened by Visual FoxPro
Using shared memory to exchange data between applications (processes)
MapViewOfFile
..msdn    Add comment     W32 Constants      Translate this page
The MapViewOfFile function maps a view of a file mapping into the address space of the calling process.
Code examples:
Using File Mapping for enumerating files opened by Visual FoxPro
Using shared memory to exchange data between applications (processes)
Declaration:
LPVOID MapViewOfFile(
  HANDLE hFileMappingObject,
  DWORD dwDesiredAccess,
  DWORD dwFileOffsetHigh,
  DWORD dwFileOffsetLow,
  SIZE_T dwNumberOfBytesToMap
);

FoxPro declaration:
DECLARE LONG MapViewOfFile IN kernel32;
    INTEGER hFileMappingObject,;
    INTEGER dwDesiredAccess,;
    LONG    dwFileOffsetHi,;
    LONG    dwFileOffsetLo,;
    LONG    dwNumberOfBytesToMap

Parameters:
hFileMappingObject
[in] Handle to an open handle of a file mapping object. The CreateFileMapping and OpenFileMapping functions return this handle.

dwDesiredAccess
[in] Type of access to the file mapping object, and therefore, the protection of the pages.

dwFileOffsetHigh
[in] High-order DWORD of the file offset where the view is to begin.

dwFileOffsetLow
[in] Low-order DWORD of the file offset where the view is to begin.

dwNumberOfBytesToMap
[in] Number of bytes of the file mapping to map to the view.
Return value:
If the function succeeds, the return value is the starting address of the mapped view.
My comment:
Mapping a file makes the specified portion of the file visible in the address space of the calling process.

For files that are larger than your address space, you can only map a small portion of the file data at a time. When you are through with the first view, then you unmap it and map a new view.

Read an article on the Miscrosoft Help And Support web site: HOWTO: Sharing Data Between Processes Using Memory-Mapped Files

See also: MapViewOfFileEx, OpenFileMapping, UnmapViewOfFile.
Word Index links for the MapViewOfFile :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-11-02 19:57:03
Modified: 2005-01-04 17:29:15
Visited in last 7 days: 18
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.178.153)
15 sec.Function: 'GetSystemTimeAsFileTime'
32 sec.Function: 'GetConsoleWindow'
48 sec.Function: 'GetThreadUILanguage'
1.05 min.Function: 'GetFileType'
1.3 min.Function: 'NetServerGetInfo'
1.57 min.
Function group: 'Filled Shape'
1.83 min.Function: 'GetTempPath'
2.1 min.Function: 'UuidCreateNil'
2.33 min.Function: 'FindFirstUrlCacheEntry'
2.6 min.Function: 'GetTempFileName'
Google
Advertise here!