Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class View
- {
- public:
- // needed by CPersistentStorage
- View()
- {
- }
- View(CFileMapping & fm) : m_lpBase(MapViewOfFile(fm.m_hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, 0))
- {
- if (m_lpBase == NULL)
- {
- AtlThrowLastWin32();
- }
- }
- ~View()
- {
- UnmapViewOfFile(m_lpBase);
- }
- View & operator=(View & that)
- {
- m_lpBase = that.m_lpBase;
- that.m_lpBase = NULL;
- return *this;
- }
- volatile LPVOID m_lpBase;
- };
Add Comment
Please, Sign In to add comment