| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csPlatformMemoryMappingWin32 Class Reference

Memory mapping for Win32. More...

`#include <csutil/win32/mmap.h>`

List of all members.

## Protected Member Functions
| csPlatformMemoryMappingWin32 ()
| Create a new mapping.
void | MapWindow (PlatformMemoryMapping &mapping, size_t offset, size_t len)
| Map a part of the file into memory and return a pointer to mapped data.
void | UnmapWindow (PlatformMemoryMapping &mapping)
| Unmap a mapping of the file.
| ~csPlatformMemoryMappingWin32 ()
| Destroy file mapping.
## Protected Attributes
size_t | granularity
HANDLE | hFileMapping
| Handle to the mapping.
HANDLE | hMappedFile
| Handle to the mapped file.
## Classes
struct | PlatformMemoryMapping

## Detailed Description

Memory mapping for Win32.

Remarks:
  This class serves as the platform-dependent part of csMemoryMappedIO, use that for memory mapping support in your application.

Definition at line 35 of file mmap.h.

## Constructor & Destructor Documentation

csPlatformMemoryMappingWin32::csPlatformMemoryMappingWin32 | ( |  | ) | `[protected]`

Create a new mapping.

csPlatformMemoryMappingWin32::~csPlatformMemoryMappingWin32 | ( |  | ) | `[protected]`

Destroy file mapping.

## Member Function Documentation

void csPlatformMemoryMappingWin32::MapWindow | ( | PlatformMemoryMapping & | mapping,
|  | size_t | offset,
|  | size_t | len |
| ) |  |  | `[protected]`

Map a part of the file into memory and return a pointer to mapped data.

offset and len are the offset and length of the part of the file to map. Both should be multiples of the granularity returned by GetPageGranularity(); otherwise, the function may fail. Returns 0 in case of failure.

void csPlatformMemoryMappingWin32::UnmapWindow | ( | PlatformMemoryMapping & | mapping | ) | `[protected]`

Unmap a mapping of the file.

## Member Data Documentation

HANDLE csPlatformMemoryMappingWin32::hFileMapping`[protected]`

Handle to the mapping.

Definition at line 46 of file mmap.h.

HANDLE csPlatformMemoryMappingWin32::hMappedFile`[protected]`

Handle to the mapped file.

Definition at line 44 of file mmap.h.

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

- csutil/win32/mmap.h