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.

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