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.

66 lines
1.4 KiB

  1. /*
  2. declarations for Win95 tracing facility
  3. */
  4. #ifndef __TRACEW95__
  5. #define __TRACEW95__
  6. #if defined( _DEBUG ) ||defined( DEBUG ) || defined( DBG )
  7. #define DBPRINTF OutputDebugStringW95
  8. #define DBPRINTF_IF(exp, msg) {if (!exp) DBPRINTF(msg);}
  9. // redefine all the MFC macros to point to us
  10. #undef TRACE
  11. #define TRACE OutputDebugStringW95
  12. #undef TRACE0
  13. #define TRACE0 OutputDebugStringW95
  14. #undef TRACE1
  15. #define TRACE1 OutputDebugStringW95
  16. #undef TRACE2
  17. #define TRACE2 OutputDebugStringW95
  18. #undef TRACE3
  19. #define TRACE3 OutputDebugStringW95
  20. // redefine OutputDebugString so that it works with
  21. // API calls
  22. #undef OutputDebugString
  23. #define OutputDebugString OutputDebugStringW95
  24. // function declarations
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. void OutputDebugStringW95( LPCTSTR lpOutputString, ... );
  29. void SpewOpenFile(LPCTSTR pszSpewFile);
  30. void SpewToFile( LPCTSTR lpOutputString, ...);
  31. void SpewCloseFile();
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #else
  36. // avoid warning:
  37. // error C4353: nonstandard extension used: constant 0 as function expression.
  38. // Use '__noop' function intrinsic instead
  39. #define DBPRINTF __noop
  40. #define DBPRINTF_IF(exp, msg)
  41. #define SpewOpenFile __noop
  42. #define SpewToFile __noop
  43. #define SpewCloseFile __noop
  44. #endif // _DEBUG || DEBUG || DBG
  45. #endif //__TRACEW95__