Source code of Windows XP (NT5)
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.

45 lines
1.4 KiB

  1. /***************************************************************************
  2. * dbutl.h -- Debugging utilities.
  3. *
  4. *
  5. ***************************************************************************/
  6. #if !defined(__DBUTL_H__)
  7. #define __DBUTL_H__
  8. // ********************************************************************
  9. // Write a debug message to the debugger or a file
  10. //
  11. #define DM_ERROR 0x0001
  12. #define DM_TRACE1 0x0002 // interface call tracing (except for messages)
  13. #define DM_TRACE2 0x0004 // status type stuff. These messages only
  14. // make sense with DM_TRACE1 enabled
  15. #define DM_MESSAGE_TRACE1 0x0008 // message tracing
  16. #define DM_MESSAGE_TRACE2 0x0010 // trace all messages (processed or not)
  17. #define DM_NOW 0x0020 // Used for temp debugging during dev.
  18. #define DM_NOEOL 0x1000 // don't follow the message with a \r\n
  19. #ifdef _DEBUG
  20. #include <assert.h>
  21. #define DEBUGBREAK DebugBreak()
  22. #define DEBUGMSG(a) DebugMessage a
  23. #define DEBUGHRESULT(a) DebugHRESULT a
  24. #define DEBUGREFIID(a) DebugREFIID a
  25. void DebugMessage(UINT mask, LPCTSTR pszMsg, ... );
  26. void DebugHRESULT(int flags, HRESULT hResult);
  27. void DebugREFIID(int flags, REFIID riid);
  28. #define ASSERT(a) assert((a))
  29. #else
  30. #define DEBUGBREAK
  31. #define DEBUGMSG(a)
  32. #define DEBUGHRESULT(a)
  33. #define DEBUGREFIID(a)
  34. #define ASSERT(a)
  35. #endif
  36. #endif // __DBUTL_H__
  37.