uLib
User mode C/C++ extended API library for Win32 programmers.
|
Interprocess shared memory. More...
#include <uLib/MemFunc.h>
Interprocess shared memory.
The SharedMem class simplifies sharing memory between processes.
It encapsulates a mapped view of a "memory file" (CreateFileMapping( -1, ... ).
DWORD Size() is determined by VirtualQuery() (an undocumented technique).
bool Flush() is provided in case the OS backs the memory by lazy-write file.
Public Data | |
PVOID const & | pData |
Const pointer to variable data. More... | |
Public Functions | |
operator PVOID () | |
operator TSTR () | |
SharedMem (size_t Size, CSTR Name) | |
SharedMem (CSTR Name) | |
~SharedMem () | |
size_t | Size () |
bool | Flush (PVOID Addr, size_t Range) |
SharedMem::SharedMem | ( | size_t | Size, |
CSTR | Name | ||
) |
Primary c'tor; Creator.
Definition at line 254 of file MemFunc.cpp.
SharedMem::SharedMem | ( | CSTR | Name | ) |
Secondary c'tor; Open existing mapping.
Definition at line 262 of file MemFunc.cpp.
SharedMem::~SharedMem | ( | ) |
Definition at line 268 of file MemFunc.cpp.
|
inline |
size_t SharedMem::Size | ( | ) |
Definition at line 274 of file MemFunc.cpp.
bool SharedMem::Flush | ( | PVOID | Addr, |
size_t | Range | ||
) |
Definition at line 289 of file MemFunc.cpp.
PVOID const& SharedMem::pData |