Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.2 KiB

  1. //--------------------------------------------------------------------
  2. // Copyright (c) 1999 Microsoft Corporation, All Rights Reserved
  3. //
  4. // eventlog.h
  5. //
  6. // Definitions and constants for writing event log events.
  7. //
  8. //--------------------------------------------------------------------
  9. //
  10. // This is the event source for IR system events:
  11. //
  12. #define WS_EVENT_SOURCE L"irevents"
  13. //
  14. // Registry values for setting up the event logging for Irmon:
  15. //
  16. #define WS_EVENTLOG_KEY L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\System"
  17. #define WS_CATALOG_PATH L"%SystemRoot%\\system32\\irmon.dll"
  18. #define WSZ_CATEGORY_COUNT L"CategoryCount"
  19. #define WSZ_CATEGORY_MESSAGE_FILE L"CategoryMessageFile"
  20. #define WSZ_EVENT_MESSAGE_FILE L"EventMessageFile"
  21. #define WSZ_TYPES_SUPPORTED L"TypesSupported"
  22. //
  23. // A simple log to write error and informational events to the
  24. // system event log.
  25. //
  26. class EVENT_LOG
  27. {
  28. public:
  29. EVENT_LOG( WCHAR *pwsEventSourceName,
  30. DWORD *pdwStatus );
  31. ~EVENT_LOG();
  32. static DWORD CheckConfiguration( WCHAR *pszsEventSourceName,
  33. WCHAR *pwszCatalogPath,
  34. DWORD dwCategoryCount,
  35. DWORD dwTypesSupported );
  36. DWORD ReportError( WORD wCategoryId,
  37. DWORD dwEventId );
  38. DWORD ReportError( WORD wCategoryId,
  39. DWORD dwEventId,
  40. DWORD dwValue1 );
  41. DWORD ReportError( WORD wCategoryId,
  42. DWORD dwEventId,
  43. WCHAR *pwszString );
  44. DWORD ReportError( WORD wCategoryId,
  45. DWORD dwEventId,
  46. WORD wNumStrings,
  47. WCHAR **ppwszStrings );
  48. DWORD ReportError( WORD wCategoryId,
  49. DWORD dwEventId,
  50. WORD wNumStrings,
  51. WCHAR **ppwszStrings,
  52. DWORD dwDataSize,
  53. VOID *pvData );
  54. DWORD ReportInfo( WORD wCategoryId,
  55. DWORD dwEventId );
  56. private:
  57. HANDLE m_hEventLog;
  58. };