///////////////////////////////////////////////////////////////////////////// // // Copyright: Microsoft Corp. 1997-1999. All rights reserved // ///////////////////////////////////////////////////////////////////////////// // Event.h : Declaration of the CEvent #ifndef __EVENT_H_ #define __EVENT_H_ #include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CEvent class ATL_NO_VTABLE CEvent : public CComObjectRootEx, public CComCoClass, public ISupportErrorInfo, public IDispatchImpl { private: long m_EventID; // Note: EventID is displayed as WORD instead of DWORD in the System's EventViewer long m_EventCategory; // origionally a WORD (unsigned short) eEventType m_EventType; _bstr_t m_Description; _bstr_t m_SourceName; _bstr_t m_EventLogName; _bstr_t m_ComputerName; _bstr_t m_UserName; DATE m_OccurrenceTime; BYTE* m_pSid; SAFEARRAY* m_pDataArray; wchar_t** m_ppArgList; unsigned int m_NumberOfStrings; // Internal only functions HRESULT CheckDefaultDescription(wchar_t** Arguments); HRESULT ParseEventBlob(EVENTLOGRECORD* pEventStructure); HRESULT SetUser(); public: CEvent() : m_EventID(0), m_EventCategory(0), m_OccurrenceTime(0), m_pSid(NULL), m_pDataArray(NULL), m_NumberOfStrings(0), m_ppArgList(NULL) { m_Description = ""; m_SourceName = ""; m_ComputerName = ""; m_UserName = ""; m_EventLogName = ""; } ~CEvent() { unsigned int i; if (m_pSid) delete []m_pSid; if (m_ppArgList) { for (i=0;i