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.

115 lines
3.2 KiB

  1. //==========================================================================;
  2. //
  3. // Copyright (c) 1991-1998 Microsoft Corporation
  4. //
  5. // You have a royalty-free right to use, modify, reproduce and
  6. // distribute the Sample Files (and/or any modified version) in
  7. // any way you find useful, provided that you agree that
  8. // Microsoft has no warranty obligations or liability for any
  9. // Sample Application Files which are modified.
  10. //
  11. //--------------------------------------------------------------------------;
  12. //
  13. // debug.h
  14. //
  15. // Description:
  16. //
  17. //
  18. // Notes:
  19. //
  20. // To use this library at interrupt time under Win16, you must do
  21. // the following:
  22. //
  23. // 1. Defined ISRDEBUG when compiling debug.c
  24. //
  25. // 2. Add a line in the SEGMENTS section of your .DEF file to
  26. // define the DEBUG_TEXT segment:
  27. //
  28. //
  29. // SEGMENTS
  30. // DEBUG_TEXT FIXED PRELOAD
  31. //
  32. //
  33. // These routines are callable at interrupt time under Win32 by
  34. // default.
  35. //
  36. // win.ini
  37. // [debug]
  38. // MIDIMAP=0|1|2|3|4
  39. //
  40. // History:
  41. // 11/23/92 cjp [curtisp]
  42. //
  43. //==========================================================================;
  44. #ifndef _INC_DEBUG
  45. #define _INC_DEBUG
  46. #ifdef __cplusplus
  47. extern "C"
  48. {
  49. #endif
  50. //
  51. //
  52. //
  53. //
  54. //
  55. #define ISRDEBUG 1
  56. #define DEBUG_SECTION "debug" // section name for
  57. #define ASSERT_BREAK "AssertBreak" // Key for break on assert
  58. #define DEBUG_MODULE_NAME "DMUSIC16" // key name and prefix for output
  59. #define DEBUG_MAX_LINE_LEN 255 // max line length (bytes)
  60. #define K_DEFAULT_LOGMEM 32
  61. #define K_MAX_LOGMEM 63
  62. #define DRV_ENABLE_DEBUG (DRV_USER+1) // Enable/disable debug message
  63. #define DRV_SET_DEBUG_LEVEL (DRV_USER+2) // Message to set the debug level
  64. #define WM_DEBUGUPDATE (WM_USER+1000)
  65. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  66. //
  67. //
  68. //
  69. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  70. #ifdef DEBUG
  71. VOID WINAPI DbgAssert(LPSTR lpstrExp, LPSTR lpstrFile, DWORD dwLine);
  72. BOOL WINAPI DbgEnable(BOOL fEnable);
  73. UINT WINAPI DbgSetLevel(UINT uLevel);
  74. UINT WINAPI DbgInitialize(BOOL fEnable);
  75. void WINAPI DbgRegisterCallback(HWND hWnd);
  76. BOOL WINAPI DbgGetNextLogEntry(LPSTR lpstrBuffer, UINT cbBuffer);
  77. void FAR CDECL dprintf(UINT uDbgLevel, LPSTR szFmt, ...);
  78. #define assert(exp) \
  79. ( (exp) ? (void) 0 : DbgAssert(#exp, __FILE__, __LINE__) )
  80. #define DPF dprintf
  81. #define D1(sz) dprintf(1,sz)
  82. #define D2(sz) dprintf(2,sz)
  83. #define D3(sz) dprintf(3,sz)
  84. #define D4(sz) dprintf(4,sz)
  85. #else
  86. #define assert(exp) ((void)0)
  87. #define DbgEnable(x) FALSE
  88. #define DbgSetLevel(x) 0
  89. #define DbgInitialize(x) 0
  90. #define DPF 1 ? (void)0 : (void)
  91. #define D1(sz)
  92. #define D2(sz)
  93. #define D3(sz)
  94. #define D4(sz)
  95. #endif
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif // _INC_DEBUG