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.

69 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 InitDebugSupport();
  36. BOOL DebugLevelOn( DWORD mask );
  37. HANDLE
  38. OpenUnicodeLogFile ( LPCTSTR lpszFilePath );
  39. extern DWORD gDebugLevel;
  40. //
  41. // Debug macros
  42. //
  43. #if DBG
  44. #define DebugMsg(x) _DebugMsg x
  45. #else
  46. #define DebugMsg(x) if ( gDebugLevel != DL_NONE ) _DebugMsg x
  47. #endif // DBG
  48. #define VerboseDebugDump( String ) DebugMsg((DM_VERBOSE | DM_NO_EVENTLOG, IDS_STRING, String))
  49. #endif