Group: File Mapping - Library: kernel32
The CreateFileMapping function creates or opens a named or unnamed file mapping object for the specified file.
Using File Mapping for enumerating files opened by Visual FoxPro
Using shared memory to exchange data between applications (processes)
HANDLE CreateFileMapping(
HANDLE hFile,
LPSECURITY_ATTRIBUTES lpAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCTSTR lpName
); DECLARE INTEGER CreateFileMapping IN kernel32;
INTEGER hFile,;
INTEGER lpAttributes,;
INTEGER flProtect,;
LONG dwMaximumSizeHi,;
LONG dwMaximumSizeLo,;
STRING lpName
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.
If the function succeeds, the return value is a handle to the file mapping object.
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.
Home