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.

67 lines
1.3 KiB

  1. //*************************************************************
  2. //
  3. // Debugging functions header file
  4. //
  5. // Microsoft Confidential
  6. // Copyright (c) Microsoft Corporation 1995
  7. // All rights reserved
  8. //
  9. //*************************************************************
  10. #ifndef _DEBUG_HXX_
  11. #define _DEBUG_HXX_
  12. #include <nt.h>
  13. #include <ntrtl.h>
  14. #include <nturtl.h>
  15. #include <windows.h>
  16. #include <userenv.h>
  17. #include <assert.h>
  18. //
  19. // Debug Levels. Must specify DL_NORMAL or DL_VERBOSE to get eventlog
  20. // or logfile output.
  21. //
  22. #define DL_NONE 0x00000000
  23. #define DL_NORMAL 0x00000001
  24. #define DL_VERBOSE 0x00000002
  25. #define DL_EVENTLOG 0x00000004
  26. #define DL_LOGFILE 0x00000008
  27. //
  28. // Debug message types
  29. //
  30. #define DM_ASSERT 0x1
  31. #define DM_WARNING 0x2
  32. #define DM_VERBOSE 0x4
  33. #define DM_NO_EVENTLOG 0x8
  34. void _DebugMsg(DWORD mask, DWORD MsgID, ...);
  35. void ConditionalBreakIntoDebugger();
  36. void InitDebugSupport();
  37. BOOL DebugLevelOn( DWORD mask );
  38. extern DWORD gDebugLevel;
  39. //
  40. // Debug macros
  41. //
  42. #if DBG
  43. #define DebugMsg(x) _DebugMsg x
  44. #else
  45. #define DebugMsg(x) if ( gDebugLevel != DL_NONE ) _DebugMsg x
  46. #endif // DBG
  47. #define VerboseDebugDump( String ) DebugMsg((DM_VERBOSE | DM_NO_EVENTLOG, IDS_STRING, String))
  48. #endif