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.

30 lines
859 B

  1. #if !defined(AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_)
  2. #define AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_
  3. #define UNICODE
  4. #define _UNICODE
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. class CLogger
  9. {
  10. public:
  11. CLogger(LPCTSTR lpctstrFileName, bool bAppend = true);
  12. ~CLogger();
  13. int LogTCHAR(LPCTSTR lpctstrOut);
  14. int LogULONG(ULONG uLong, bool bHex = true);
  15. int LogULONG64(ULONG64 uLong64, bool bHex = true);
  16. int LogGUID(GUID Guid);
  17. int LogEventTraceProperties(PEVENT_TRACE_PROPERTIES pProps);
  18. int LogTime(time_t &Time);
  19. void Flush() {m_pPersistor->Stream().flush();}
  20. HRESULT GetOpenStatus() {return m_hr;}
  21. private:
  22. CPersistor *m_pPersistor;
  23. char *m_sFileName;
  24. HRESULT m_hr;
  25. };
  26. #endif // !defined(AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_)