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.

48 lines
1.3 KiB

  1. //
  2. // debug.h
  3. //
  4. // Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved.
  5. //
  6. // Note:
  7. //
  8. #ifndef DEBUG_H
  9. #define DEBUG_H
  10. #include <windows.h>
  11. #define DM_DEBUG_CRITICAL 1 // Used to include critical messages
  12. #define DM_DEBUG_NON_CRITICAL 2 // Used to include level 1 plus important non-critical messages
  13. #define DM_DEBUG_STATUS 3 // Used to include level 1 and level 2 plus status\state messages
  14. #define DM_DEBUG_FUNC_FLOW 4 // Used to include level 1, level 2 and level 3 plus function flow messages
  15. #define DM_DEBUG_ALL 5 // Used to include all debug messages
  16. // Default to no debug output compiled
  17. //
  18. #define Trace
  19. #define TraceI
  20. #define assert(exp) ((void)0)
  21. #ifdef DBG
  22. // Checked build: include at least external debug spew
  23. //
  24. extern void DebugInit(void);
  25. extern void DebugTrace(int iDebugLevel, LPSTR pstrFormat, ...);
  26. extern void DebugAssert(LPSTR szExp, LPSTR szFile, ULONG ulLine);
  27. # undef Trace
  28. # define Trace DebugTrace
  29. # undef assert
  30. # define assert(exp) (void)( (exp) || (DebugAssert(#exp, __FILE__, __LINE__), 0) )
  31. // If internal build flag set, include everything
  32. //
  33. # ifdef DMUSIC_INTERNAL
  34. # undef TraceI
  35. # define TraceI DebugTrace
  36. # endif
  37. #endif // #ifdef DBG
  38. #endif // #ifndef DEBUG_H