Source code of Windows XP (NT5)
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.

17 lines
535 B

  1. //LPMEMORY MemoryAllocate (DWORD dwSize) ;
  2. #define MemoryAllocate(s) (LPMEMORY)GlobalAlloc(GPTR, s)
  3. //VOID MemoryFree (LPMEMORY lpMemory) ;
  4. #define MemoryFree(p) (VOID)(p != 0 ? (VOID)GlobalFree(p) : 0)
  5. //DWORD MemorySize (LPMEMORY lpMemory) ;
  6. #define MemorySize(p) (DWORD)(p != 0 ? (DWORD)GlobalSize(p) : 0)
  7. //LPMEMORY MemoryResize (LPMEMORY lpMemory,
  8. // DWORD dwNewSize) ;
  9. #define MemoryResize(p,s) (LPMEMORY)(p != 0 ? \
  10. (LPMEMORY)GlobalReAlloc (p, s, (GMEM_MOVEABLE | GMEM_ZEROINIT)) : NULL)
  11.