Leaked source code of windows server 2003
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.

90 lines
2.7 KiB

  1. // service.h: interface for the CGeneralService class.
  2. //
  3. // Copyright (c)1997-1999 Microsoft Corporation
  4. //
  5. //////////////////////////////////////////////////////////////////////
  6. #if !defined(AFX_SERVICE_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)
  7. #define AFX_SERVICE_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. CGeneralService stands for System Service.
  16. Base class:
  17. CGenericClass, because it is a class representing a WMI
  18. object - its WMI class name is Sce_SystemService
  19. Purpose of class:
  20. (1) Implement Sce_SystemService 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. Alway through the common interface defined by
  25. CGenericClass.
  26. */
  27. class CGeneralService : public CGenericClass
  28. {
  29. public:
  30. CGeneralService (
  31. ISceKeyChain *pKeyChain,
  32. IWbemServices *pNamespace,
  33. IWbemContext *pCtx = NULL
  34. );
  35. virtual ~CGeneralService ();
  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 wszObjName,
  51. BOOL bPostFilter);
  52. HRESULT DeleteInstance (
  53. IWbemObjectSink *pHandler,
  54. CSceStore* pSceStore,
  55. LPCWSTR wszObjName
  56. );
  57. HRESULT SaveSettingsToStore (
  58. CSceStore* pSceStore,
  59. LPCWSTR wszObjName,
  60. DWORD Startup,
  61. LPCWSTR wszSDDL
  62. );
  63. };
  64. #endif // !defined(AFX_SERVICE_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)