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.

60 lines
1019 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. wtdebug.c
  5. Abstract: This module contains all the debug functions.
  6. Environment:
  7. User mode
  8. Author:
  9. Michael Tsang (MikeTs) 13-Mar-2000
  10. Revision History:
  11. --*/
  12. #include "pch.h"
  13. #ifdef WTDEBUG
  14. int giWTVerboseLevel = 0;
  15. /*++
  16. @doc INTERNAL
  17. @func VOID | WTDebugPrint | Print to system debugger.
  18. @parm IN LPCSTR | format | Points to the format string.
  19. @parm ... | Arguments.
  20. @rvalue SUCCESS | returns the number of chars stored in the buffer not
  21. counting the terminating null characters.
  22. @rvalue FAILURE | returns less than the length of the expected output.
  23. --*/
  24. int LOCAL
  25. WTDebugPrint(
  26. IN LPCSTR format,
  27. ...
  28. )
  29. {
  30. int n;
  31. static char szMessage[256] = {0};
  32. va_list arglist;
  33. va_start(arglist, format);
  34. n = wvsprintfA(szMessage, format, arglist);
  35. va_end(arglist);
  36. OutputDebugStringA(szMessage);
  37. return n;
  38. } //WTDebugPrint
  39. #endif //ifdef WTDEBUG