Windows NT 4.0 source code leak
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.

122 lines
2.6 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. mprdbg.h
  5. Abstract:
  6. Contains definitions used in debugging the messenger service.
  7. Author:
  8. Dan Lafferty (danl) 07-Oct-1991
  9. Environment:
  10. User Mode -Win32
  11. Revision History:
  12. 22-Jul-1992 Danl
  13. Added different debug macros based on the number of parameters.
  14. Make the macros resolve to nothing when DBG is not defined.
  15. --*/
  16. #ifndef _MPRDBG_INCLUDED
  17. #define _MPRDBG_INCLUDED
  18. //
  19. // Information levels used in switch statements.
  20. //
  21. #define LEVEL_0 0L
  22. #define LEVEL_1 1L
  23. #define LEVEL_2 2L
  24. //
  25. // Debug macros and constants.
  26. //
  27. #if DBG
  28. #define DEBUG_STATE 1
  29. #define STATIC
  30. #else
  31. #define DEBUG_STATE 0
  32. #define STATIC static
  33. #endif
  34. extern DWORD MprDebugLevel;
  35. //
  36. // The following allow debug print syntax to look like:
  37. //
  38. // MPR_LOG(DEBUG_TRACE, "An error occured %x\n",status)
  39. //
  40. #if DBG
  41. //
  42. // debugging macros.
  43. //
  44. #define MPR_LOG0(level,string) \
  45. if( MprDebugLevel & (DEBUG_ ## level)){ \
  46. (VOID) DbgPrint("[MPR] " string); \
  47. }
  48. #define MPR_LOG1(level,string,var) \
  49. if( MprDebugLevel & (DEBUG_ ## level)){ \
  50. (VOID) DbgPrint("[MPR] " string,var); \
  51. }
  52. #define MPR_LOG2(level,string,var1,var2) \
  53. if( MprDebugLevel & (DEBUG_ ## level)){ \
  54. (VOID) DbgPrint("[MPR] " string,var1,var2); \
  55. }
  56. #define MPR_LOG3(level,string,var1,var2,var3) \
  57. if( MprDebugLevel & (DEBUG_ ## level)){ \
  58. (VOID) DbgPrint("[MPR] " string,var1,var2,var3); \
  59. }
  60. #define MPR_LOG(level,string,var) \
  61. if( MprDebugLevel & (DEBUG_ ## level)){ \
  62. (VOID) DbgPrint("[MPR] " string,var); \
  63. }
  64. #else // DBG
  65. #define MPR_LOG0(level,string)
  66. #define MPR_LOG1(level,string,var)
  67. #define MPR_LOG2(level,string,var1,var2)
  68. #define MPR_LOG3(level,string,var1,var2,var3)
  69. #define MPR_LOG(level,string,var)
  70. #endif // DBG
  71. #define DEBUG_NONE 0x00000000
  72. #define DEBUG_ERROR 0x00000001
  73. #define DEBUG_TRACE 0x00000002 // Miscellaneous trace info
  74. #define DEBUG_LOCKS 0x00000004 // Multi-thread data locks
  75. #define DEBUG_PS 0x00000008 // Thread and Process information
  76. #define DEBUG_RESTORE 0x00000010 // Restore Connection information
  77. #define DEBUG_CNOTIFY 0x00000020 // Connection Notify information
  78. #define DEBUG_ANSI 0x00000040 // Ansi API thunks
  79. #define DEBUG_ROUTE 0x00000080 // Routing of calls among providers
  80. #define DEBUG_ALL 0xffffffff
  81. #endif // _MPRDBG_INCLUDED
  82. //
  83. // Function Prototypes
  84. //
  85. VOID
  86. PrintKeyInfo(
  87. HKEY key);