mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 08:07:06 -06:00
23.01
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Windows/MemoryGlobal.h
|
||||
|
||||
#ifndef __WINDOWS_MEMORY_GLOBAL_H
|
||||
#define __WINDOWS_MEMORY_GLOBAL_H
|
||||
#ifndef ZIP7_INC_WINDOWS_MEMORY_GLOBAL_H
|
||||
#define ZIP7_INC_WINDOWS_MEMORY_GLOBAL_H
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
@@ -12,7 +12,7 @@ class CGlobal
|
||||
{
|
||||
HGLOBAL _global;
|
||||
public:
|
||||
CGlobal(): _global(NULL){};
|
||||
CGlobal(): _global(NULL) {}
|
||||
~CGlobal() { Free(); }
|
||||
operator HGLOBAL() const { return _global; }
|
||||
void Attach(HGLOBAL hGlobal)
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
}
|
||||
HGLOBAL Detach()
|
||||
{
|
||||
HGLOBAL h = _global;
|
||||
const HGLOBAL h = _global;
|
||||
_global = NULL;
|
||||
return h;
|
||||
}
|
||||
@@ -42,10 +42,10 @@ public:
|
||||
CGlobalLock(HGLOBAL hGlobal): _global(hGlobal)
|
||||
{
|
||||
_ptr = GlobalLock(hGlobal);
|
||||
};
|
||||
}
|
||||
~CGlobalLock()
|
||||
{
|
||||
if (_ptr != NULL)
|
||||
if (_ptr)
|
||||
GlobalUnlock(_global);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user