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.

50 lines
978 B

  1. //=======================================================================
  2. //
  3. // Copyright (c) 1999 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: v3applog.h
  6. //
  7. // Purpose: Reading WindowsUpdate V3 history logging
  8. //
  9. // History: 22-Feb-99 YAsmi Created
  10. // 02-May-01 JHou Modified
  11. //
  12. //=======================================================================
  13. #ifndef _APPLOG_H_
  14. #define _APPLOG_H_
  15. #define LOG_FIELD_SEPARATOR "|"
  16. class CV3AppLog
  17. {
  18. public:
  19. CV3AppLog(LPCTSTR pszLogFileName = NULL);
  20. ~CV3AppLog();
  21. void SetLogFile(LPCTSTR pszLogFileName);
  22. //
  23. // reading
  24. //
  25. void StartReading();
  26. BOOL ReadLine();
  27. BOOL CopyNextField(LPSTR pszBuf, int cBufSize);
  28. void StopReading();
  29. private:
  30. void CheckBuf(DWORD dwSize);
  31. LPTSTR m_pszLogFN;
  32. LPSTR m_pFileBuf;
  33. LPSTR m_pFieldBuf;
  34. LPSTR m_pLine;
  35. DWORD m_dwFileSize;
  36. DWORD m_dwBufLen;
  37. DWORD m_dwFileOfs;
  38. };
  39. #endif // _APPLOG_H_