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.

29 lines
436 B

  1. #include <stdio.h>
  2. #include <stdarg.h>
  3. #include <windows.h>
  4. #include "logger.h"
  5. void Log(char *pszfmt, ...)
  6. {
  7. char message[1000];
  8. va_list args;
  9. FILE *logFile;
  10. logFile = fopen("c:\\cabview.txt","a");
  11. if (logFile != NULL)
  12. {
  13. va_start(args,pszfmt);
  14. vsprintf(message,pszfmt,args);
  15. va_end(args);
  16. fprintf(logFile,message);
  17. fclose(logFile);
  18. }
  19. else
  20. {
  21. Beep(0,0);
  22. }
  23. }