home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / pserv.cpl / pserv-2.4.exe / source / ceventlog.h < prev    next >
C/C++ Source or Header  |  2005-01-05  |  2KB  |  70 lines

  1. #ifndef CEventLog_h
  2. #define CEventLog_h
  3.  
  4. #include "CListViewTools.h"
  5.  
  6. class CEventLog;
  7.  
  8. class CEventSource : public CObject
  9.     {
  10.     public:
  11.         CEventSource( LPCTSTR name, LPCTSTR type );
  12.         virtual ~CEventSource();
  13.         BOOL IsValid();
  14.  
  15.         CString m_strName;
  16.         CString m_strFile;
  17.         HANDLE m_hFile;
  18.     };
  19.  
  20. class CEventEntry  : public CListViewEntry
  21.     {
  22.     public:
  23.         CEventEntry( CEventLog* parent, PEVENTLOGRECORD entry );
  24.         virtual CString GetDisplayString(DWORD dwIndex);
  25.         virtual COLORREF GetTextColor();
  26.         virtual CString GetInfoTip();
  27.         
  28.         CString m_strTimeWritten;
  29.         CString m_strEventType;
  30.         CString m_strSourceName;
  31.         CString m_strComputerName;
  32.         CString m_strSourceDll;
  33.         CString m_strEventCategory;
  34.         CString m_strDescription;
  35.         CString m_strShortText;
  36.         CStringArray m_strStrings;
  37.         EVENTLOGRECORD m_Record;
  38.         CString m_strUsername;
  39.         CString m_strTimeGenerated;
  40.         CString m_strRecordNumber;
  41.         CString m_strClosingRecordNumber;
  42.  
  43.         static CString GetEventTypeAsString(DWORD dwEventType);
  44.  
  45.     };
  46.  
  47. class CEventLog : public CListViewEntries
  48.     {
  49.     public:
  50.         CEventLog();
  51.  
  52.         virtual BOOL Refresh();
  53.         virtual void ConnectTo( LPCTSTR lpszMachine );
  54.         void SetEnumType( LPCTSTR lpszType );
  55.         virtual void ExportXmlToFile( CFile* pFile );
  56.         virtual UINT GetContextMenuID();
  57.  
  58.         CEventSource* GetEventSource(LPCTSTR name);
  59.  
  60.     protected:
  61.         void RefreshTitleString();
  62.  
  63.         CObArray m_EventSources;
  64.         CString m_strLogName;
  65.     };
  66.             
  67.  
  68. #endif // CEventLog_h
  69.  
  70.