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.

99 lines
3.0 KiB

  1. // eventlog.h: interface for the CEventLogSettings class.
  2. //
  3. // Copyright (c)1997-1999 Microsoft Corporation
  4. //
  5. //////////////////////////////////////////////////////////////////////
  6. #if !defined(AFX_EVENTLOG_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)
  7. #define AFX_EVENTLOG_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11. #include "GenericClass.h"
  12. /*
  13. Class description
  14. Naming:
  15. CEventLogSettings.
  16. Base class:
  17. CGenericClass, because it is a class representing a WMI
  18. object - its WMI class name is Sce_EventLog
  19. Purpose of class:
  20. (1) Implement Sce_EventLog WMI class.
  21. Design:
  22. (1) Almost trivial other than implementing necessary method as a concrete class
  23. Use:
  24. (1) Almost never used directly. Always through the common interface defined by
  25. CGenericClass.
  26. */
  27. class CEventLogSettings : public CGenericClass
  28. {
  29. public:
  30. CEventLogSettings (
  31. ISceKeyChain *pKeyChain,
  32. IWbemServices *pNamespace,
  33. IWbemContext *pCtx = NULL
  34. );
  35. virtual ~CEventLogSettings ();
  36. virtual HRESULT PutInst (
  37. IWbemClassObject *pInst,
  38. IWbemObjectSink *pHandler,
  39. IWbemContext *pCtx
  40. );
  41. virtual HRESULT CreateObject (
  42. IWbemObjectSink *pHandler,
  43. ACTIONTYPE atAction
  44. );
  45. private:
  46. HRESULT ConstructInstance (
  47. IWbemObjectSink *pHandler,
  48. CSceStore* pSceStore,
  49. LPCWSTR wszLogStorePath,
  50. LPCWSTR wszLogType,
  51. BOOL bPostFilter
  52. );
  53. HRESULT DeleteInstance (
  54. IWbemObjectSink *pHandler,
  55. CSceStore* pSceStore,
  56. LPCWSTR wszLogType
  57. );
  58. HRESULT ValidateEventlogType (
  59. LPCWSTR wszLogType,
  60. DWORD *pIndex
  61. );
  62. HRESULT SaveSettingsToStore (
  63. CSceStore* pScePersist,
  64. LPCWSTR Section,
  65. DWORD dwSize,
  66. DWORD dwRet,
  67. DWORD dwDays,
  68. DWORD dwRestrict
  69. );
  70. };
  71. PCWSTR GetEventLogType (DWORD idx);
  72. #endif // !defined(AFX_EVENTLOG_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)