76 lines
2.2 KiB
Plaintext
76 lines
2.2 KiB
Plaintext
//--------------------------------------------------------------------
|
|
// Copyright (c) 1999 Microsoft Corporation, All Rights Reserved
|
|
//
|
|
// eventlog.h
|
|
//
|
|
// Definitions and constants for writing event log events.
|
|
//
|
|
//--------------------------------------------------------------------
|
|
|
|
//
|
|
// This is the event source for IR system events:
|
|
//
|
|
#define WS_EVENT_SOURCE L"irevents"
|
|
|
|
//
|
|
// Registry values for setting up the event logging for Irmon:
|
|
//
|
|
#define WS_EVENTLOG_KEY L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\System"
|
|
#define WS_CATALOG_PATH L"%SystemRoot%\\system32\\irmon.dll"
|
|
|
|
#define WSZ_CATEGORY_COUNT L"CategoryCount"
|
|
#define WSZ_CATEGORY_MESSAGE_FILE L"CategoryMessageFile"
|
|
#define WSZ_EVENT_MESSAGE_FILE L"EventMessageFile"
|
|
#define WSZ_TYPES_SUPPORTED L"TypesSupported"
|
|
|
|
//
|
|
// A simple log to write error and informational events to the
|
|
// system event log.
|
|
//
|
|
class EVENT_LOG
|
|
{
|
|
public:
|
|
|
|
EVENT_LOG( WCHAR *pwsEventSourceName,
|
|
DWORD *pdwStatus );
|
|
|
|
~EVENT_LOG();
|
|
|
|
static DWORD CheckConfiguration( WCHAR *pszsEventSourceName,
|
|
WCHAR *pwszCatalogPath,
|
|
DWORD dwCategoryCount,
|
|
DWORD dwTypesSupported );
|
|
|
|
DWORD ReportError( WORD wCategoryId,
|
|
DWORD dwEventId );
|
|
|
|
DWORD ReportError( WORD wCategoryId,
|
|
DWORD dwEventId,
|
|
DWORD dwValue1 );
|
|
|
|
DWORD ReportError( WORD wCategoryId,
|
|
DWORD dwEventId,
|
|
WCHAR *pwszString );
|
|
|
|
DWORD ReportError( WORD wCategoryId,
|
|
DWORD dwEventId,
|
|
WORD wNumStrings,
|
|
WCHAR **ppwszStrings );
|
|
|
|
DWORD ReportError( WORD wCategoryId,
|
|
DWORD dwEventId,
|
|
WORD wNumStrings,
|
|
WCHAR **ppwszStrings,
|
|
DWORD dwDataSize,
|
|
VOID *pvData );
|
|
|
|
DWORD ReportInfo( WORD wCategoryId,
|
|
DWORD dwEventId );
|
|
|
|
private:
|
|
HANDLE m_hEventLog;
|
|
|
|
};
|
|
|
|
|