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.

87 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. debugafx.h
  5. Abstract:
  6. Debugging routines using AFX/MFC extensions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef _DEBUGAFX_H
  14. #define _DEBUGAFX_H
  15. //
  16. // ENUM for special debug output control tokens
  17. //
  18. enum ENUM_DEBUG_AFX
  19. {
  20. EDBUG_AFX_EOL = -1
  21. };
  22. //
  23. // Debug Formatting Macros
  24. //
  25. #if defined(_DEBUG)
  26. #define TRACEFMTPGM DbgFmtPgm( THIS_FILE, __LINE__ )
  27. #define TRACEOUT(x) { afxDump << x; }
  28. #define TRACEEOL(x) { afxDump << x << EDBUG_AFX_EOL; }
  29. #define TRACEEOLID(x) { afxDump << TRACEFMTPGM << x << EDBUG_AFX_EOL; }
  30. #define TRACEEOLERR(err,x) { if (err) TRACEEOLID(x) }
  31. #else
  32. #define TRACEOUT(x) { ; }
  33. #define TRACEEOL(x) { ; }
  34. #define TRACEEOLID(x) { ; }
  35. #define TRACEEOLERR(err,x) { ; }
  36. #endif
  37. //
  38. // Append an EOL onto the debug output stream
  39. //
  40. COMDLL CDumpContext & operator <<(
  41. IN CDumpContext & out,
  42. IN ENUM_DEBUG_AFX edAfx
  43. );
  44. #ifndef UNICODE
  45. COMDLL CDumpContext & operator <<(
  46. IN CDumpContext & out,
  47. IN LPCWSTR pwchStr
  48. );
  49. #endif UNICODE
  50. //
  51. // Format a program name and line number for output (removes the path info)
  52. //
  53. COMDLL extern LPCSTR
  54. DbgFmtPgm (
  55. IN LPCSTR szFn,
  56. IN int line
  57. );
  58. COMDLL CDumpContext & operator <<(
  59. IN CDumpContext & out,
  60. IN const GUID & guid
  61. );
  62. #endif // _DEBUGAFX_H