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.

96 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1991-92 Microsoft Corporation
  3. Module Name:
  4. SvcDebug.h
  5. Abstract:
  6. Contains debug macros used by the Net Service Controller APIs.
  7. Author:
  8. Dan Lafferty (danl) 22-Apr-1991
  9. Environment:
  10. User Mode -Win32
  11. Revision History:
  12. 30-Mar-1992 JohnRo
  13. Extracted DanL's code from /nt/private project back to NET project.
  14. Use NetpDbgPrint instead of DbgPrint.
  15. 08-May-1992 JohnRo
  16. Use <prefix.h> equates.
  17. 02-Nov-1992 JohnRo
  18. RAID 7780: added IF_DEBUG() macro. Added TRANSLATE trace bit.
  19. --*/
  20. #ifndef _SVCDEBUG_
  21. #define _SVCDEBUG_
  22. #include <netdebug.h> // NetpDbgPrint(), etc.
  23. #include <prefix.h> // PREFIX_ equates.
  24. //
  25. // Debug macros and constants.
  26. //
  27. /*lint -e767 */ // Don't complain about different definitions
  28. #if DBG
  29. #define DEBUG_STATE 1
  30. #define IF_DEBUG(Function) if (SvcctrlDebugLevel & DEBUG_ ## Function)
  31. #else
  32. #define DEBUG_STATE 0
  33. #define IF_DEBUG(Function) if (FALSE)
  34. #endif // DBG
  35. /*lint +e767 */ // Resume checking for different macro definitions
  36. extern DWORD SvcctrlDebugLevel;
  37. //
  38. // The following allow debug print syntax to look like:
  39. //
  40. // SC_LOG(DEBUG_TRACE, "An error occured %x\n",status)
  41. //
  42. #if DBG
  43. //
  44. // Client-side debugging macro.
  45. //
  46. #define SCC_LOG(level,string,var) \
  47. if( SvcctrlDebugLevel & (DEBUG_ ## level)){ \
  48. NetpDbgPrint(PREFIX_NETAPI "[SCSTUB] "); \
  49. NetpDbgPrint(string,var); \
  50. }
  51. #else
  52. #define SC_LOG(level,string,var)
  53. #define SCC_LOG(level,string,var)
  54. #endif
  55. #define DEBUG_NONE 0x00000000
  56. #define DEBUG_ERROR 0x00000001
  57. #define DEBUG_TRACE 0x00000002
  58. #define DEBUG_LOCKS 0x00000004
  59. #define DEBUG_HANDLE 0x00000008
  60. #define DEBUG_SECURITY 0x00000010
  61. #define DEBUG_TRANSLATE 0x00000020
  62. #define DEBUG_ALL 0xffffffff
  63. #endif // _SVCDEBUG_