|
static IntPtr | MapViewOfFile (IntPtr hFileMappingObject, FileMapAccess dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, uint dwNumberOfBytesToMap) |
| Maps a view of a file mapping into the address space of a calling process. More...
|
|
static IntPtr | OpenFileMapping (FileMapAccess dwDesiredAccess, bool bInheritHandle, string lpName) |
| Opens a named file mapping object. More...
|
|
static bool | UnmapViewOfFile (IntPtr lpBaseAddress) |
| Unmaps a mapped view of a file from the calling process's address space. More...
|
|
static bool | CloseHandle (IntPtr hHandle) |
| Closes an open object handle. More...
|
|
static uint | GetLastError () |
| Retrieves the calling thread's last-error code value. More...
|
|
static IntPtr | CreateFileMapping (IntPtr hFile, IntPtr lpAttributes, FileProtection flProtect, uint dwMaximumSizeHigh, uint dwMaximumSizeLow, string lpName) |
| Creates or opens a named or unnamed file mapping object for a specified file. More...
|
|
static IntPtr | MapViewOfFile (IntPtr hFileMappingObject, FileMapAccess dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, uint dwNumberOfBytesToMap) |
| Maps a view of a file mapping into the address space of a calling process. More...
|
|
static bool | UnmapViewOfFile (IntPtr lpBaseAddress) |
| Unmaps a mapped view of a file from the calling process's address space. More...
|
|
static bool | CloseHandle (IntPtr hHandle) |
| Closes an open object handle. More...
|
|
static uint | GetLastError () |
| Retrieves the calling thread's last-error code value. More...
|
|
static IntPtr FileMappingNative.MapViewOfFile |
( |
IntPtr |
hFileMappingObject, |
|
|
FileMapAccess |
dwDesiredAccess, |
|
|
uint |
dwFileOffsetHigh, |
|
|
uint |
dwFileOffsetLow, |
|
|
uint |
dwNumberOfBytesToMap |
|
) |
| |
Maps a view of a file mapping into the address space of a calling process.
- Parameters
-
hFileMappingObject | A handle to a file mapping object. The CreateFileMapping and OpenFileMapping functions return this handle. |
dwDesiredAccess | The type of access to a file mapping object, which determines the protection of the pages. |
dwFileOffsetHigh | A high-order DWORD of the file offset where the view begins. |
dwFileOffsetLow | A low-order DWORD of the file offset where the view is to begin. |
dwNumberOfBytesToMap | The number of bytes of a file mapping to map to the view. All bytes must be within the maximum size specified by CreateFileMapping. |
- Returns
- If the function succeeds, the return value is the starting address of the mapped view.
Referenced by Program.Main().
static IntPtr FileMappingNative.OpenFileMapping |
( |
FileMapAccess |
dwDesiredAccess, |
|
|
bool |
bInheritHandle, |
|
|
string |
lpName |
|
) |
| |
Opens a named file mapping object.
- Parameters
-
dwDesiredAccess | The access to the file mapping object. This access is checked against any security descriptor on the target file mapping object. |
bInheritHandle | If this parameter is TRUE, a process created by the CreateProcess function can inherit the handle; otherwise, the handle cannot be inherited. |
lpName | The name of the file mapping object to be opened. |
- Returns
- If the function succeeds, the return value is an open handle to the specified file mapping object.
Referenced by Program.Main().
static bool FileMappingNative.UnmapViewOfFile |
( |
IntPtr |
lpBaseAddress | ) |
|
Unmaps a mapped view of a file from the calling process's address space.
- Parameters
-
lpBaseAddress | A pointer to the base address of the mapped view of a file that is to be unmapped. |
- Returns
Referenced by Program.Main().
static bool FileMappingNative.CloseHandle |
( |
IntPtr |
hHandle | ) |
|
Closes an open object handle.
- Parameters
-
hHandle | Handle to an open object. |
- Returns
- If the function succeeds, the return value is nonzero.
Referenced by Program.Main().
static uint FileMappingNative.GetLastError |
( |
| ) |
|
Retrieves the calling thread's last-error code value.
- Returns
- The return value is the calling thread's last-error code value.
Referenced by Program.Main().
static IntPtr FileMappingNative.CreateFileMapping |
( |
IntPtr |
hFile, |
|
|
IntPtr |
lpAttributes, |
|
|
FileProtection |
flProtect, |
|
|
uint |
dwMaximumSizeHigh, |
|
|
uint |
dwMaximumSizeLow, |
|
|
string |
lpName |
|
) |
| |
Creates or opens a named or unnamed file mapping object for a specified file.
- Parameters
-
hFile | A handle to the file from which to create a file mapping object. |
lpAttributes | A pointer to a SECURITY_ATTRIBUTES structure that determines whether a returned handle can be inherited by child processes. |
flProtect | Specifies the page protection of the file mapping object. All mapped views of the object must be compatible with this protection. |
dwMaximumSizeHigh | The high-order DWORD of the maximum size of the file mapping object. |
dwMaximumSizeLow | The low-order DWORD of the maximum size of the file mapping object. |
lpName | The name of the file mapping object. |
- Returns
- If the function succeeds, the return value is a handle to the newly created file mapping object.
Referenced by Program.Main().
static IntPtr FileMappingNative.MapViewOfFile |
( |
IntPtr |
hFileMappingObject, |
|
|
FileMapAccess |
dwDesiredAccess, |
|
|
uint |
dwFileOffsetHigh, |
|
|
uint |
dwFileOffsetLow, |
|
|
uint |
dwNumberOfBytesToMap |
|
) |
| |
Maps a view of a file mapping into the address space of a calling process.
- Parameters
-
hFileMappingObject | A handle to a file mapping object. The CreateFileMapping and OpenFileMapping functions return this handle. |
dwDesiredAccess | The type of access to a file mapping object, which determines the protection of the pages. |
dwFileOffsetHigh | A high-order DWORD of the file offset where the view begins. |
dwFileOffsetLow | A low-order DWORD of the file offset where the view is to begin. |
dwNumberOfBytesToMap | The number of bytes of a file mapping to map to the view. All bytes must be within the maximum size specified by CreateFileMapping. |
- Returns
- If the function succeeds, the return value is the starting address of the mapped view.
static bool FileMappingNative.UnmapViewOfFile |
( |
IntPtr |
lpBaseAddress | ) |
|
Unmaps a mapped view of a file from the calling process's address space.
- Parameters
-
lpBaseAddress | A pointer to the base address of the mapped view of a file that is to be unmapped. |
- Returns
static bool FileMappingNative.CloseHandle |
( |
IntPtr |
hHandle | ) |
|
Closes an open object handle.
- Parameters
-
hHandle | Handle to an open object. |
- Returns
- If the function succeeds, the return value is nonzero.
static uint FileMappingNative.GetLastError |
( |
| ) |
|
Retrieves the calling thread's last-error code value.
- Returns
- The return value is the calling thread's last-error code value.
const int FileMappingNative.INVALID_HANDLE_VALUE = -1 |
The documentation for this class was generated from the following file:
- igsandbox/InterprocessCommunication/named_pipe_examples_master/Inter-Process Communication (IPC)/CSFileMappingClient/FileMappingNative.cs