IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
FileMappingNative Class Reference

Public Member Functions

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...
 

Public Attributes

const int INVALID_HANDLE_VALUE = -1
 

Member Function Documentation

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
hFileMappingObjectA handle to a file mapping object. The CreateFileMapping and OpenFileMapping functions return this handle.
dwDesiredAccessThe type of access to a file mapping object, which determines the protection of the pages.
dwFileOffsetHighA high-order DWORD of the file offset where the view begins.
dwFileOffsetLowA low-order DWORD of the file offset where the view is to begin.
dwNumberOfBytesToMapThe 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
dwDesiredAccessThe access to the file mapping object. This access is checked against any security descriptor on the target file mapping object.
bInheritHandleIf this parameter is TRUE, a process created by the CreateProcess function can inherit the handle; otherwise, the handle cannot be inherited.
lpNameThe 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
lpBaseAddressA 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
hHandleHandle 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
hFileA handle to the file from which to create a file mapping object.
lpAttributesA pointer to a SECURITY_ATTRIBUTES structure that determines whether a returned handle can be inherited by child processes.
flProtectSpecifies the page protection of the file mapping object. All mapped views of the object must be compatible with this protection.
dwMaximumSizeHighThe high-order DWORD of the maximum size of the file mapping object.
dwMaximumSizeLowThe low-order DWORD of the maximum size of the file mapping object.
lpNameThe 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
hFileMappingObjectA handle to a file mapping object. The CreateFileMapping and OpenFileMapping functions return this handle.
dwDesiredAccessThe type of access to a file mapping object, which determines the protection of the pages.
dwFileOffsetHighA high-order DWORD of the file offset where the view begins.
dwFileOffsetLowA low-order DWORD of the file offset where the view is to begin.
dwNumberOfBytesToMapThe 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
lpBaseAddressA 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
hHandleHandle 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.

Member Data Documentation

const int FileMappingNative.INVALID_HANDLE_VALUE = -1

Referenced by Program.Main().


The documentation for this class was generated from the following file: