Leaked source code of windows server 2003
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.

41 lines
973 B

  1. #ifdef __cplusplus
  2. extern "C" {
  3. #endif
  4. #if DEBUG
  5. #define LocalAlloc(flags, dwBytes) DeskAllocPrivate(TEXT(__FILE__), __LINE__, flags, (dwBytes))
  6. #define LocalReAlloc(hMem, dwBytes, flags) DeskReAllocPrivate(TEXT(__FILE__), __LINE__, (hMem), (dwBytes), flags)
  7. #define LocalFree(hMem) DeskFreePrivate((hMem))
  8. #define DeskCheckForLeaks() DeskCheckForLeaksPrivate()
  9. #define DirectLocalFree(hMem) DeskFreeDirect((hMem))
  10. #define ODS(sz) (OutputDebugStringA(sz), OutputDebugStringA("\r\n"))
  11. #else
  12. #define DirectLocalFree(hMem) LocalFree((hMem))
  13. #define ODS(sz)
  14. #endif
  15. HLOCAL
  16. DeskAllocPrivate(const TCHAR *File, ULONG Line, ULONG Flags, DWORD dwBytes);
  17. HLOCAL
  18. DeskReAllocPrivate(const TCHAR *File, ULONG Line, HLOCAL hMem, DWORD dwBytes, ULONG Flags);
  19. HLOCAL
  20. DeskFreePrivate(HLOCAL hMem);
  21. HLOCAL
  22. DeskFreeDirect(HLOCAL hMem);
  23. VOID
  24. DeskCheckForLeaksPrivate(VOID);
  25. #ifdef __cplusplus
  26. }
  27. #endif