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 >
Wrap
C/C++ Source or Header
|
2005-01-05
|
2KB
|
70 lines
#ifndef CEventLog_h
#define CEventLog_h
#include "CListViewTools.h"
class CEventLog;
class CEventSource : public CObject
{
public:
CEventSource( LPCTSTR name, LPCTSTR type );
virtual ~CEventSource();
BOOL IsValid();
CString m_strName;
CString m_strFile;
HANDLE m_hFile;
};
class CEventEntry : public CListViewEntry
{
public:
CEventEntry( CEventLog* parent, PEVENTLOGRECORD entry );
virtual CString GetDisplayString(DWORD dwIndex);
virtual COLORREF GetTextColor();
virtual CString GetInfoTip();
CString m_strTimeWritten;
CString m_strEventType;
CString m_strSourceName;
CString m_strComputerName;
CString m_strSourceDll;
CString m_strEventCategory;
CString m_strDescription;
CString m_strShortText;
CStringArray m_strStrings;
EVENTLOGRECORD m_Record;
CString m_strUsername;
CString m_strTimeGenerated;
CString m_strRecordNumber;
CString m_strClosingRecordNumber;
static CString GetEventTypeAsString(DWORD dwEventType);
};
class CEventLog : public CListViewEntries
{
public:
CEventLog();
virtual BOOL Refresh();
virtual void ConnectTo( LPCTSTR lpszMachine );
void SetEnumType( LPCTSTR lpszType );
virtual void ExportXmlToFile( CFile* pFile );
virtual UINT GetContextMenuID();
CEventSource* GetEventSource(LPCTSTR name);
protected:
void RefreshTitleString();
CObArray m_EventSources;
CString m_strLogName;
};
#endif // CEventLog_h