GME  13
MgaEventLogger.h
Go to the documentation of this file.
00001 // MgaEventLogger.h: interface for the CMgaEventLogger class.
00002 //
00004 
00005 #ifndef MGA_MGAEVENTLOGGER_H
00006 #define MGA_MGAEVENTLOGGER_H
00007 
00008 #include <stdio.h>
00009 #include <direct.h>
00010 
00011 class ATL_NO_VTABLE CMgaEventLogger :
00012         public CComObjectRootEx<CComSingleThreadModel>,
00013         public CComCoClass<CMgaEventLogger, &__uuidof(MgaEventLogger)>,
00014         public IDispatchImpl<IMgaEventLogger, &__uuidof(IMgaEventLogger), &__uuidof(__MGAUtilLib)>  
00015 {
00016 public:
00017         CMgaEventLogger();
00018         ~CMgaEventLogger();
00019 
00020 DECLARE_REGISTRY_RESOURCEID(IDR_MGAEVENTLOGGER)
00021 
00022 DECLARE_CLASSFACTORY_SINGLETON(CMgaEventLogger)
00023 
00024 DECLARE_PROTECT_FINAL_CONSTRUCT()
00025 
00026 BEGIN_COM_MAP(CMgaEventLogger)
00027         COM_INTERFACE_ENTRY(IMgaEventLogger)
00028         COM_INTERFACE_ENTRY(IDispatch)
00029 END_COM_MAP()
00030 
00031 public:
00032         STDMETHOD(LogEvent)(BSTR eventMsg);
00033         STDMETHOD(StartLogging)();
00034         STDMETHOD(StopLogging)();
00035         STDMETHOD(EmergencyEvent)();
00036 
00037 private:
00038         FILE *EventLog;
00039         bool initialized;
00040         bool newLine;
00041 
00042 };
00043 
00044 #endif // !defined(MGA_MGAEVENTLOGGER_H)