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.

111 lines
3.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // TaskCancelCleanup.h
  7. //
  8. // Description:
  9. // CTaskCancelCleanup implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 25-JAN-2002
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. // Make sure that this file is included only once per compile path.
  16. #pragma once
  17. //////////////////////////////////////////////////////////////////////////////
  18. // Include Files
  19. //////////////////////////////////////////////////////////////////////////////
  20. //////////////////////////////////////////////////////////////////////////////
  21. // Constant Declarations
  22. //////////////////////////////////////////////////////////////////////////////
  23. //////////////////////////////////////////////////////////////////////////////
  24. //++
  25. //
  26. // class CTaskCancelCleanup
  27. //
  28. // Description:
  29. // The class CTaskCancelCleanup is the cleanup task that is invoked
  30. // whenever the wizard is canceled.
  31. //
  32. // Interfaces:
  33. // ITaskCancelCleanup
  34. //
  35. //--
  36. //////////////////////////////////////////////////////////////////////////////
  37. class CTaskCancelCleanup
  38. : public ITaskCancelCleanup
  39. , public IClusCfgCallback
  40. {
  41. private:
  42. //
  43. // Private member functions and data
  44. //
  45. LONG m_cRef;
  46. bool m_fStop;
  47. OBJECTCOOKIE m_cookieCluster;
  48. IClusCfgCallback * m_picccCallback;
  49. OBJECTCOOKIE m_cookieCompletion;
  50. IObjectManager * m_pom;
  51. INotifyUI * m_pnui;
  52. CTaskCancelCleanup( void );
  53. ~CTaskCancelCleanup( void );
  54. STDMETHOD( HrInit )( void );
  55. HRESULT HrProcessNode( OBJECTCOOKIE cookieNodeIn );
  56. HRESULT HrTaskCleanup( HRESULT hrIn );
  57. HRESULT HrTaskSetup( void );
  58. // Private copy constructor to prevent copying.
  59. CTaskCancelCleanup( const CTaskCancelCleanup & nodeSrc );
  60. // Private assignment operator to prevent copying.
  61. const CTaskCancelCleanup & operator = ( const CTaskCancelCleanup & nodeSrc );
  62. public:
  63. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  64. //
  65. // IUnknown
  66. //
  67. STDMETHOD_( ULONG, AddRef )( void );
  68. STDMETHOD_( ULONG, Release )( void );
  69. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  70. //
  71. // ITaskCancelCleanup
  72. //
  73. STDMETHOD( BeginTask )( void );
  74. STDMETHOD( StopTask )( void );
  75. STDMETHOD( SetClusterCookie )( OBJECTCOOKIE cookieClusterIn );
  76. STDMETHOD( SetCompletionCookie )( OBJECTCOOKIE cookieCompletionIn );
  77. //
  78. // IClusCfgCallback
  79. //
  80. STDMETHOD( SendStatusReport )(
  81. LPCWSTR pcszNodeNameIn
  82. , CLSID clsidTaskMajorIn
  83. , CLSID clsidTaskMinorIn
  84. , ULONG ulMinIn
  85. , ULONG ulMaxIn
  86. , ULONG ulCurrentIn
  87. , HRESULT hrStatusIn
  88. , LPCWSTR pcszDescriptionIn
  89. , FILETIME * pftTimeIn
  90. , LPCWSTR pcszReferenceIn
  91. );
  92. }; //*** class CTaskCancelCleanup