This commit is contained in:
Igor Pavlov
2005-06-28 00:00:00 +00:00
committed by Kornel Lesiński
parent 3c510ba80b
commit ac2b563958
83 changed files with 3668 additions and 1316 deletions

View File

@@ -10,15 +10,16 @@ class CGlobal
{
HGLOBAL m_MemoryHandle;
public:
CGlobal():m_MemoryHandle(NULL){};
CGlobal(): m_MemoryHandle(NULL){};
~CGlobal();
operator HGLOBAL() const { return m_MemoryHandle; };
void Attach(HGLOBAL hGlobal);
HGLOBAL Detach();
bool Alloc(UINT aFlags, DWORD aSize);
bool Alloc(UINT flags, SIZE_T size);
bool Free();
LPVOID Lock() const;
void Unlock() const;
bool ReAlloc(DWORD aSize);
bool ReAlloc(SIZE_T size);
};
@@ -28,9 +29,9 @@ class CGlobalLock
LPVOID m_Pointer;
public:
LPVOID GetPointer() const { return m_Pointer; }
CGlobalLock(HGLOBAL aGlobal): m_Global(aGlobal)
CGlobalLock(HGLOBAL hGlobal): m_Global(hGlobal)
{
m_Pointer = ::GlobalLock(m_Global);
m_Pointer = ::GlobalLock(hGlobal);
};
~CGlobalLock()
{