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.

67 lines
1.4 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Microsoft Windows, Copyright (C) Microsoft Corporation, 2000
  3. File : Debug.h
  4. Content: Global debug facilities.
  5. History: 03-22-2001 dsie created
  6. ------------------------------------------------------------------------------*/
  7. #ifndef __DEBUG_H__
  8. #define __DEBUG_H__
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifdef DBG
  13. #include <shlwapi.h>
  14. void DebugTrace(LPCSTR pszFormat, ...)
  15. {
  16. va_list arglist;
  17. char szBuffer[512] = "";
  18. char szMessage[640] = "[Wlballoon] - ";
  19. va_start(arglist, pszFormat);
  20. if (0 < wvnsprintfA(szBuffer, sizeof(szBuffer), pszFormat, arglist))
  21. {
  22. lstrcatA(szMessage, szBuffer);
  23. OutputDebugStringA(szMessage);
  24. }
  25. va_end(arglist);
  26. return;
  27. }
  28. #else
  29. inline void DebugTrace(LPCSTR pszFormat, ...) {};
  30. #endif
  31. #ifdef WLBALLOON_PRIVATE_DEBUG
  32. void PrivateDebugTrace(LPCSTR pszFormat, ...)
  33. {
  34. va_list arglist;
  35. char szBuffer[512] = "";
  36. char szMessage[640] = "[Wlballoon] - ";
  37. va_start(arglist, pszFormat);
  38. if (0 < wvnsprintfA(szBuffer, sizeof(szBuffer), pszFormat, arglist))
  39. {
  40. lstrcatA(szMessage, szBuffer);
  41. OutputDebugStringA(szMessage);
  42. }
  43. va_end(arglist);
  44. return;
  45. }
  46. #else
  47. inline void PrivateDebugTrace(LPCSTR pszFormat, ...) {};
  48. #endif
  49. #ifdef __cplusplus
  50. } // Balance extern "C" above
  51. #endif
  52. #endif // __DEBUG_H__