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.

32 lines
754 B

  1. #include "stdafx.h"
  2. #include "Tools.h"
  3. #include "msgwrap.h"
  4. extern CMessageWrapper g_MsgWrapper;
  5. //////////////////////////////////////////////////////////////////////////
  6. //
  7. // Function: Trace()
  8. // Details: This function displays a string to the debugger, (for tracing)
  9. // Remarks: The Trace() function compiles to nothing, when building release.
  10. //
  11. // format - String to display to the debugger
  12. //
  13. //////////////////////////////////////////////////////////////////////////
  14. VOID Trace(LPCTSTR format,...)
  15. {
  16. #ifdef _DEBUG
  17. TCHAR Buffer[1024];
  18. va_list arglist;
  19. va_start(arglist, format);
  20. wvsprintf(Buffer, format, arglist);
  21. va_end(arglist);
  22. OutputDebugString(Buffer);
  23. OutputDebugString(TEXT("\n"));
  24. #endif
  25. }