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.

126 lines
3.9 KiB

4 years ago
  1. //****************************************************************************
  2. //
  3. // Module: Unimdm
  4. // File: debug.h
  5. // Content: This file contains the declaration for debug macros
  6. //
  7. // Copyright (c) 1992-1996, Microsoft Corporation, all rights reserved
  8. //
  9. // History:
  10. //
  11. //****************************************************************************
  12. // Defines for rovcomm.h
  13. #define NORTL
  14. #define NOMEM
  15. #define NODA
  16. #define NOSHAREDHEAP
  17. #define NOFILEINFO
  18. #define NOCOLORHELP
  19. #define NODRAWTEXT
  20. #define NODIALOGHELPER
  21. #define NOMESSAGESTRING
  22. #define NOSTRING
  23. #define NOPATH
  24. #define NOSYNC
  25. #define NODI
  26. #define SZ_MODULEA "MDMDBG"
  27. #define SZ_MODULEW L##"MDMDBG"
  28. #define SZ_DEBUGSECTION L##"UNIMDM"
  29. #define SZ_DEBUGINI L##"unimdm.ini"
  30. #include <rovcomm.h>
  31. // Trace flags
  32. #define TF_DWDEVICEID 0x00010000
  33. #define TF_HDLINE 0x00020000
  34. #define TF_HDCALL 0x00040000
  35. #define TF_PLINEDEV 0x00080000
  36. #define TF_PMODEMINFO 0x00100000
  37. // Traditional DPRINTF defines
  38. #define DPRINTF(sz) TRACE_MSG(TF_GENERAL, sz)
  39. #define DPRINTF1(sz,x) TRACE_MSG(TF_GENERAL, sz, x)
  40. #define DPRINTF2(sz,x,y) TRACE_MSG(TF_GENERAL, sz, x, y)
  41. #define DPRINTF3(sz,x,y,z) TRACE_MSG(TF_GENERAL, sz, x, y, z)
  42. #define DPRINTF4(sz,w,x,y,z) TRACE_MSG(TF_GENERAL, sz, w, x, y, z)
  43. #define DPRINTF5(sz,w,x,y,z,a) TRACE_MSG(TF_GENERAL, sz, w, x, y, z, a)
  44. #define DPRINTF6(sz,w,x,y,z,a,b) TRACE_MSG(TF_GENERAL, sz, w, x, y, z, a, b)
  45. #define DPRINTFA(sz) TRACE_MSGA(TF_GENERAL, sz)
  46. #define DPRINTFA1(sz,x) TRACE_MSGA(TF_GENERAL, sz, x)
  47. #define DPRINTFA2(sz,x,y) TRACE_MSGA(TF_GENERAL, sz, x, y)
  48. #define DPRINTFA3(sz,x,y,z) TRACE_MSGA(TF_GENERAL, sz, x, y, z)
  49. #define DPRINTFA4(sz,w,x,y,z) TRACE_MSGA(TF_GENERAL, sz, w, x, y, z)
  50. #define SPTrace(x) DBG_ENTER(x)
  51. // Supplementary debug print macros
  52. #define DBG_DDI_ENTER(fn) \
  53. TRACE_MSG(TF_FUNC | TF_DWDEVICEID, \
  54. ">" fn "(dwDeviceID = %#08lx)", \
  55. (ULONG)(dwDeviceID))
  56. #define DBG_HDL_ENTER(fn) \
  57. TRACE_MSG(TF_FUNC | TF_HDLINE, \
  58. ">" fn "(hdLine = %#08lx)", \
  59. (ULONG)(hdLine))
  60. #define DBG_HDC_ENTER(fn) \
  61. TRACE_MSG(TF_FUNC | TF_HDCALL, \
  62. ">" fn "(hdCall = %#08lx)", \
  63. (ULONG)(hdCall))
  64. #define DBG_PLD_ENTER(fn) \
  65. TRACE_MSG(TF_FUNC | TF_PLINEDEV, \
  66. ">" fn "(pLineDev = %#08lx)", \
  67. (ULONG)(pLineDev))
  68. #define DBG_PMI_ENTER(fn) \
  69. TRACE_MSG(TF_FUNC | TF_PMODEMINFO, \
  70. ">" fn "(pModemInfo = %#08lx)", \
  71. (ULONG)(pModemInfo))
  72. #define DBG_DDI_EXIT(fn, ul) \
  73. TRACE_MSG(TF_FUNC | TF_DWDEVICEID, \
  74. "<" fn "(dwDeviceID = %#08lx) with %#08lx", \
  75. (ULONG)(dwDeviceID), (ULONG)(ul))
  76. #define DBG_HDL_EXIT(fn, ul) \
  77. TRACE_MSG(TF_FUNC | TF_HDLINE, \
  78. "<" fn "(hdLine = %#08lx) with %#08lx", \
  79. (ULONG)(hdLine), (ULONG)(ul))
  80. #define DBG_HDC_EXIT(fn, ul) \
  81. TRACE_MSG(TF_FUNC | TF_HDCALL, \
  82. "<" fn "(hdCall = %#08lx) with %#08lx", \
  83. (ULONG)(hdCall), (ULONG)(ul))
  84. #define DBG_PLD_EXIT(fn, ul) \
  85. TRACE_MSG(TF_FUNC | TF_PLINEDEV, \
  86. "<" fn "(pLineDev = %#08lx) with %#08lx", \
  87. (ULONG)(pLineDev), (ULONG)(ul))
  88. #define DBG_PMI_EXIT(fn, ul) \
  89. TRACE_MSG(TF_FUNC | TF_PMODEMINFO, \
  90. "<" fn "(pModemInfo = %#08lx) with %#08lx", \
  91. (ULONG)(pModemInfo), (ULONG)(ul))
  92. // Debug Messages
  93. //
  94. #ifdef DEBUG
  95. #define D_TRACE(_x) {_x}
  96. #else
  97. #define D_TRACE(_x)
  98. #endif //ifdef DEBUG