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.

89 lines
1.9 KiB

  1. // SCEAgent.h : Declaration of the CSCEAgent
  2. #ifndef __SCEAGENT_H_
  3. #define __SCEAGENT_H_
  4. #include "resource.h" // main symbols
  5. typedef struct _SERVICE_NODE_ {
  6. PWSTR Name;
  7. DWORD dwStartupType;
  8. DWORD dwGeneralUse;
  9. _SERVICE_NODE_ *Next;
  10. } SERVICE_NODE, *PSERVICE_NODE;
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CSCEAgent
  13. class ATL_NO_VTABLE CSCEAgent :
  14. public CComObjectRootEx<CComSingleThreadModel>,
  15. public CComCoClass<CSCEAgent, &CLSID_SCEAgent>,
  16. public IDispatchImpl<ISCEAgent, &IID_ISCEAgent, &LIBID_SSRLib>
  17. {
  18. protected:
  19. //
  20. // we don't want anyone (include self) to be able to do an assignment
  21. // or invoking copy constructor.
  22. //
  23. CSCEAgent (const CSCEAgent& );
  24. void operator = (const CSCEAgent& );
  25. public:
  26. CSCEAgent()
  27. {
  28. m_headServiceList = NULL;
  29. }
  30. virtual ~CSCEAgent()
  31. {
  32. Cleanup();
  33. }
  34. DECLARE_REGISTRY_RESOURCEID(IDR_SSRTENGINE)
  35. DECLARE_PROTECT_FINAL_CONSTRUCT()
  36. BEGIN_COM_MAP(CSCEAgent)
  37. COM_INTERFACE_ENTRY(ISCEAgent)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. END_COM_MAP()
  40. // ISCEAgent
  41. public:
  42. STDMETHOD(CreateRollbackTemplate) (
  43. IN BSTR bstrTemplatePath,
  44. IN BSTR bstrRollbackPath,
  45. IN BSTR bstrLogFilePath
  46. );
  47. STDMETHOD(Configure) (
  48. IN BSTR bstrTemplate,
  49. IN LONG lAreaMask,
  50. IN BSTR bstrLogFile
  51. );
  52. STDMETHOD(UpdateServiceList) (
  53. IN BSTR bstrServiceName,
  54. IN BSTR bstrStartupType
  55. );
  56. STDMETHOD(CreateServicesCfgRbkTemplates) (
  57. IN BSTR bstrTemplatePath,
  58. IN BSTR bstrRollbackPath,
  59. IN BSTR bstrLogFilePath
  60. );
  61. private:
  62. void Cleanup();
  63. PSERVICE_NODE m_headServiceList;
  64. };
  65. HRESULT
  66. SceStatusToHRESULT (
  67. DWORD SceStatus
  68. );
  69. #endif //__SCEAGENT_H_