|
#pragma once
#include<Windows.h>
#include<string>
using namespace std;
class CSharedMemory
{
HANDLE m_fh;
HANDLE m_hfilemap;
PBYTE m_pb;
DWORD m_filesize;
public:
CSharedMemory():m_fh(0),m_hfilemap(0),m_pb(0),m_filesize(0)
{
}
int createsm(wstring &path,PBYTE *pb);
int opensm(wstring &path,PBYTE *pb);
int flush();
//PBYTE getmemory();
~CSharedMemory()
{
CloseHandle(m_fh);
CloseHandle(m_hfilemap);
UnmapViewOfFile(m_pb);
}
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have worked in ESM, Storage and Embedded domains. Mainly taken part in design, coding and maintaining in c/c++ on windows.
As a hobby tinkering with embedded/electronic devices (new found interest
)...