#pragma once namespace SbjCore { namespace Utils { namespace Mem { // GlobalLock wrapper unlocks when it goes out of scope class GlobalLock { public: explicit GlobalLock(HGLOBAL hMem); ~GlobalLock(); LPVOID GetMemPtr(); private: GlobalLock(); // Not defined GlobalLock(const GlobalLock& other); // Not defined const GlobalLock& operator=(const GlobalLock& other); // Not defined HGLOBAL m_hMem; // address of global memory object LPVOID m_pMem; // pointer to the first byte of memory block }; } } } //*** Modification History *** // $Log: $
By viewing downloads associated with this article you agree to the Terms of use 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.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Skills that self-taught computer programmers lack