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.

26 lines
618 B

  1. void __cdecl Trace(const char* FormatString, ...)
  2. {
  3. char buffer[2000];
  4. va_list args;
  5. va_start(args, FormatString);
  6. _vsnprintf(buffer, RTL_NUMBER_OF(buffer), FormatString, args);
  7. buffer[RTL_NUMBER_OF(buffer) - 1] = 0;
  8. for (PSTR s = buffer ; *s != 0 ; )
  9. {
  10. PSTR t = strchr(s, '\n');
  11. if (t != NULL)
  12. *t = 0;
  13. printf("stdout : %s\n", s);
  14. OutputDebugStringA("debugger: ");
  15. OutputDebugStringA(s);
  16. OutputDebugStringA("\n");
  17. if (t != NULL)
  18. s = t + 1;
  19. }
  20. va_end(args);
  21. }