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.

24 lines
554 B

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