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.

23 lines
534 B

  1. #include "stdafx.h"
  2. //#define DEBUG_FLAG
  3. #ifdef DEBUG_FLAG
  4. inline void _cdecl DebugTrace(LPTSTR lpszFormat, ...)
  5. {
  6. int nBuf;
  7. TCHAR szBuffer[512];
  8. va_list args;
  9. va_start(args, lpszFormat);
  10. nBuf = _vsntprintf(szBuffer, sizeof(szBuffer), lpszFormat, args);
  11. ASSERT(nBuf < sizeof(szBuffer)); //Output truncated as it was > sizeof(szBuffer)
  12. OutputDebugString(szBuffer);
  13. va_end(args);
  14. }
  15. #else
  16. inline void _cdecl DebugTrace(LPTSTR , ...){}
  17. #endif
  18. #define IISDebugOutput DebugTrace