Leaked source code of windows server 2003
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
413 B

  1. #include "dbg.h"
  2. #include <strsafe.h>
  3. #define ARRAYSIZE(a) (sizeof((a))/sizeof((a)[0]))
  4. #ifdef DEBUG
  5. void __cdecl DbgTrace(DWORD, LPTSTR pszMsg, ...)
  6. {
  7. TCHAR szBuf[4096];
  8. va_list vArgs;
  9. va_start(vArgs, pszMsg);
  10. StringCchVPrintf(szBuf, ARRAYSIZE(szBuf), pszMsg, vArgs);
  11. va_end(vArgs);
  12. OutputDebugString(szBuf);
  13. OutputDebugString(TEXT("\n"));
  14. }
  15. #endif