windows-nt/Source/XPSP1/NT/sdktools/perfmon/pmemory.h
2020-09-26 16:20:57 +08:00

18 lines
535 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//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)