#include <EventLog.h>
Public Member Functions | |
| CEventLog () | |
| Default constructor. | |
| ~CEventLog () | |
| Tidy the event log if opened. | |
| BOOL | Open (LPCTSTR SourceName, LPCTSTR Computer=NULL) |
| Open the event log for writing. | |
| void | Close () |
| Close the event log. | |
| BOOL | ReportEvent (WORD wType, DWORD dwEventID, WORD wCategory=0, WORD wNumStrings=0, LPCTSTR *lpStrings=NULL, DWORD dwDataSize=0, LPVOID lpRawData=NULL, PSID lpUserSID=NULL) |
| Write an event to the event log. | |
| BOOL | ReportInformation (DWORD dwEventID, LPCTSTR str1=0, LPCTSTR str2=0, LPCTSTR str3=0, LPCTSTR str4=0) |
| Write an information event with no category to the event log. | |
| BOOL | ReportWarning (DWORD dwEventID, LPCTSTR str1=0, LPCTSTR str2=0, LPCTSTR str3=0, LPCTSTR str4=0) |
| Write an warning event with no category to the event log. | |
| BOOL | ReportError (DWORD dwEventID, LPCTSTR str1=0, LPCTSTR str2=0, LPCTSTR str3=0, LPCTSTR str4=0) |
| Write an error event with no category to the event log. | |
| BOOL | ReportAPIError (DWORD dwEventID, DWORD dwErr, LPCTSTR str1=0, LPCTSTR str2=0, LPCTSTR str3=0) |
| Write an Win32 API error message event with no category to the event log. | |
Static Public Member Functions | |
| LONG | RegisterMessageDLL (LPCTSTR SourceName, LPCTSTR MessageDLLPath=NULL, HMODULE hModule=NULL, DWORD TypesSupported=EVENTLOG_ERROR_TYPE|EVENTLOG_WARNING_TYPE|EVENTLOG_INFORMATION_TYPE) |
| Register a message DLL for the given event source/types. If the message DLL path is not supplied then the name of the current module is used. | |
| LONG | UnregisterMessageDLL (LPCTSTR SourceName) |
| Unregister the message DLL(s) for the named source. | |
|
||||||||||||
|
Open the event log for writing.
|
|
||||||||||||||||||||
|
Register a message DLL for the given event source/types. If the message DLL path is not supplied then the name of the current module is used.
|
|
||||||||||||||||||||||||
|
Write an Win32 API error message event with no category to the event log.
|
|
||||||||||||||||||||||||
|
Write an error event with no category to the event log.
|
|
||||||||||||||||||||||||||||||||||||
|
Write an event to the event log.
|
|
||||||||||||||||||||||||
|
Write an information event with no category to the event log.
|
|
||||||||||||||||||||||||
|
Write an warning event with no category to the event log.
|
|
|
Unregister the message DLL(s) for the named source.
|
1.3.9.1