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.

36 lines
771 B

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <tchar.h>
  5. class SymOutput {
  6. private:
  7. FILE *fh;
  8. TCHAR filename[_MAX_PATH];
  9. // We use variable sw to provide '\n' if program switch in between printf and stdprintf.
  10. int sw;
  11. FILE *Open(LPTSTR szFileName);
  12. void Close(void);
  13. void FreeFileName(void);
  14. public:
  15. // Set the log file to store the result we so->printf
  16. FILE *SetFileName(LPTSTR szFileName);
  17. // Printf to the output
  18. int printf(const char *,...);
  19. // Printf to standard output instead write to so->fh
  20. int stdprintf(const char *format, ...);
  21. SymOutput(); // Constructor
  22. ~SymOutput(); // Distructor
  23. };
  24. typedef class SymOutput *pSymOutput;