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.

149 lines
4.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CClusCfgNodeInfo.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the
  10. // CClusCfgNodeInfo class.
  11. //
  12. // The class CClusCfgNodeInfo is the representation of a
  13. // computer that can be a cluster node. It implements the
  14. // IClusCfgNodeInfo interface.
  15. //
  16. // Documentation:
  17. //
  18. // Implementation Files:
  19. // CClusCfgNodeInfo.cpp
  20. //
  21. // Maintained By:
  22. // Galen Barbee (GalenB) 21-FEB-2000
  23. //
  24. //////////////////////////////////////////////////////////////////////////////
  25. // Make sure that this file is included only once per compile path.
  26. #pragma once
  27. //////////////////////////////////////////////////////////////////////////////
  28. // Include Files
  29. //////////////////////////////////////////////////////////////////////////////
  30. #include "PrivateInterfaces.h"
  31. //////////////////////////////////////////////////////////////////////////////
  32. // Constant Declarations
  33. //////////////////////////////////////////////////////////////////////////////
  34. //////////////////////////////////////////////////////////////////////////////
  35. //++
  36. //
  37. // class CClusCfgNodeInfo
  38. //
  39. // Description:
  40. // The class CClusCfgNodeInfo is the representation of a
  41. // computer that can be a cluster node.
  42. //
  43. // Interfaces:
  44. // IClusCfgNodeInfo
  45. // IClusCfgWbemServices
  46. // IClusCfgInitialize
  47. //
  48. //--
  49. //////////////////////////////////////////////////////////////////////////////
  50. class CClusCfgNodeInfo
  51. : public IClusCfgNodeInfo
  52. , public IClusCfgWbemServices
  53. , public IClusCfgInitialize
  54. {
  55. private:
  56. //
  57. // Private member functions and data
  58. //
  59. LONG m_cRef;
  60. BSTR m_bstrFullDnsName;
  61. LCID m_lcid;
  62. IClusCfgCallback * m_picccCallback;
  63. IWbemServices * m_pIWbemServices;
  64. DWORD m_fIsClusterNode;
  65. IUnknown * m_punkClusterInfo;
  66. // Private constructors and destructors
  67. CClusCfgNodeInfo( void );
  68. ~CClusCfgNodeInfo( void );
  69. // Private copy constructor to prevent copying.
  70. CClusCfgNodeInfo( const CClusCfgNodeInfo & nodeSrc );
  71. // Private assignment operator to prevent copying.
  72. const CClusCfgNodeInfo & operator = ( const CClusCfgNodeInfo & nodeSrc );
  73. HRESULT HrInit( void );
  74. HRESULT HrComputeDriveLetterUsageEnums( WCHAR * pszDrivesIn, SDriveLetterMapping * pdlmDriveLetterUsageOut );
  75. HRESULT HrComputeSystemDriveLetterUsage( SDriveLetterMapping * pdlmDriveLetterUsageOut );
  76. HRESULT HrSetPageFileEnumIndex( SDriveLetterMapping * pdlmDriveLetterUsageOut );
  77. public:
  78. //
  79. // Public, non interface methods.
  80. //
  81. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  82. //
  83. // IUnknown Interfaces
  84. //
  85. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  86. STDMETHOD_( ULONG, AddRef )( void );
  87. STDMETHOD_( ULONG, Release )( void );
  88. //
  89. // IClusCfgWbemServices Interfaces
  90. //
  91. STDMETHOD( SetWbemServices )( IWbemServices * pIWbemServicesIn );
  92. //
  93. // IClusCfgInitialize Interfaces
  94. //
  95. // Register callbacks, locale id, etc.
  96. STDMETHOD( Initialize )( IUnknown * punkCallbackIn, LCID lcidIn );
  97. //
  98. // IClusCfgNodeInfo Interfaces
  99. //
  100. //
  101. // Name (Fully Qualified Domain Name) e.g. cluster1.ntdev.microsoft.com
  102. //
  103. STDMETHOD( GetName )( BSTR * pbstrNameOut );
  104. STDMETHOD( SetName )( LPCWSTR pcszNameIn );
  105. // Membership?
  106. STDMETHOD( IsMemberOfCluster )( void );
  107. // If it is a member, use this method to obtain an interface to
  108. // IClusterConfigurationInfo.
  109. STDMETHOD( GetClusterConfigInfo )( IClusCfgClusterInfo ** ppClusCfgClusterInfoOut );
  110. STDMETHOD( GetOSVersion )( DWORD * pdwMajorVersionOut, DWORD * pdwMinorVersionOut, WORD * pwSuiteMaskOut, BYTE * pbProductTypeOut, BSTR * pbstrCSDVersionOut );
  111. // Cluster Version
  112. STDMETHOD( GetClusterVersion )( DWORD * pdwNodeHighestVersion, DWORD * pdwNodeLowestVersion );
  113. // Drive Letter Mappings
  114. STDMETHOD( GetDriveLetterMappings )( SDriveLetterMapping * pdlmDriveLetterUsageOut );
  115. }; //*** Class CClusCfgNodeInfo