mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
535 B
18 lines
535 B
|
|
|
|
|
|
//LPMEMORY MemoryAllocate (DWORD dwSize) ;
|
|
#define MemoryAllocate(s) (LPMEMORY)GlobalAlloc(GPTR, s)
|
|
|
|
//VOID MemoryFree (LPMEMORY lpMemory) ;
|
|
#define MemoryFree(p) (VOID)(p != 0 ? (VOID)GlobalFree(p) : 0)
|
|
|
|
//DWORD MemorySize (LPMEMORY lpMemory) ;
|
|
#define MemorySize(p) (DWORD)(p != 0 ? (DWORD)GlobalSize(p) : 0)
|
|
|
|
//LPMEMORY MemoryResize (LPMEMORY lpMemory,
|
|
// DWORD dwNewSize) ;
|
|
#define MemoryResize(p,s) (LPMEMORY)(p != 0 ? \
|
|
(LPMEMORY)GlobalReAlloc (p, s, (GMEM_MOVEABLE | GMEM_ZEROINIT)) : NULL)
|
|
|
|
|