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)
CreateFileMapping
..msdn    Add comment     W32 Constants      Translate this page
The CreateFileMapping function creates or opens a named or unnamed file mapping object for the specified file.
Code examples:
Using shared memory to exchange data between applications (processes)
Using File Mapping for enumerating files opened by Visual FoxPro
Declaration:
HANDLE CreateFileMapping(
  HANDLE hFile,
  LPSECURITY_ATTRIBUTES lpAttributes,
  DWORD flProtect,
  DWORD dwMaximumSizeHigh,
  DWORD dwMaximumSizeLow,
  LPCTSTR lpName
);
FoxPro declaration:
DECLARE INTEGER CreateFileMapping IN kernel32;
    INTEGER hFile,;
    INTEGER lpAttributes,;
    INTEGER flProtect,;
    LONG    dwMaximumSizeHi,;
    LONG    dwMaximumSizeLo,;
    STRING  lpName

Parameters:
hFile
[in] Handle to the file from which to create a mapping object; can be INVALID_HANDLE_VALUE.

lpAttributes
[in] Pointer to a SECURITY_ATTRIBUTES structure; can be NULL.

flProtect
[in] Protection desired for the file view, when the file is mapped.

dwMaximumSizeHigh
[in] High-order DWORD of the maximum size of the file mapping object.

dwMaximumSizeLow
[in] Low-order DWORD of the maximum size of the file mapping object.

lpName
[in] Pointer to a null-terminated string specifying the name of the mapping object; can be NULL.
Return value:
If the function succeeds, the return value is a handle to the file mapping object.
My comment:
If dwMaximumSizeHigh and dwMaximumSizeHigh are zero, the maximum size of the file mapping object is equal to the current size of the file identified by hFile.

If lpName is NULL, the mapping object is created without a name.
Word Index links for the CreateFileMapping :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-11-02 19:50:49
Modified: 2004-11-02 19:55:34
Visited in last 7 days: 40
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 (23.22.136.56)
16 sec.Function: 'GetFileAttributesEx'
Function group: 'File Management'
33 sec.Function: 'mixerGetDevCaps'
50 sec.Function: 'NetUserChangePassword'
1.12 min.Function: 'SearchPath'
Function group: 'File Management'
1.4 min.Function: 'PathBuildRoot'
1.7 min.Function: 'CryptEncrypt'
1.98 min.Example: 'GDI+: loading image file, drawing on it, saving the result to another file'
2.3 min.Function: 'LookupPrivilegeDisplayName'
2.58 min.Example: 'Disabling mouse and keyboard input for the main VFP window (with the app still running)'
2.87 min.Example: 'Opening the Page Setup dialog box to specify the attributes of a printed page'
Google
Advertise here!