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.

44 lines
1.1 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992
  5. //
  6. // File: debug.hxx
  7. //
  8. // Contents: Debugging routines
  9. //
  10. // History: 07-Mar-92 DrewB Created
  11. //
  12. //---------------------------------------------------------------
  13. #ifndef __DEBUG_HXX__
  14. #define __DEBUG_HXX__
  15. #define DBG_NORM 1
  16. #define DBG_CRIT 2
  17. #define DBG_SLOW 4
  18. #define DBG_FAST (DBG_NORM | DBG_CRIT)
  19. #define DBG_ALL (DBG_NORM | DBG_CRIT | DBG_SLOW)
  20. #define DBG_VERBOSE 128
  21. void DbgChkBlocks(DWORD dwFlags, char *pszFile, int iLine);
  22. void DbgAddChkBlock(char *pszName,
  23. void *pvAddr,
  24. ULONG cBytes,
  25. DWORD dwFlags);
  26. void DbgFreeChkBlock(void *pvAddr);
  27. void DbgFreeChkBlocks(void);
  28. #if DBG == 1
  29. #define olChkBlocks(a) DbgChkBlocks(a, __FILE__, __LINE__)
  30. #define olAddChkBlock(a) DbgAddChkBlock a
  31. #define olFreeChkBlock(a) DbgFreeChkBlock a
  32. #define olFreeChkBlocks(a) DbgFreeChkBlocks a
  33. #else
  34. #define olChkBlocks(a)
  35. #define olAddChkBlock(a)
  36. #define olFreeChkBlock(a)
  37. #define olRemChkBlock(a)
  38. #endif
  39. #endif