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.

159 lines
3.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ClusterUtils.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the ClusterUtils
  10. // functions.
  11. //
  12. // Implementation Files:
  13. // ClusterUtils.cpp
  14. //
  15. // Maintained By:
  16. // Galen Barbee (GalenB) 01-JAN-2000
  17. //
  18. //////////////////////////////////////////////////////////////////////////////
  19. #pragma once
  20. //
  21. // Cluster API Functions.
  22. //
  23. HRESULT
  24. HrIsCoreResource(
  25. HRESOURCE hResIn
  26. );
  27. HRESULT
  28. HrIsResourceOfType(
  29. HRESOURCE hResIn
  30. , const WCHAR * pszResourceTypeIn
  31. );
  32. HRESULT
  33. HrGetIPAddressInfo(
  34. HRESOURCE hResIn
  35. , ULONG * pulIPAddress
  36. , ULONG * pulSubnetMask
  37. , BSTR * pbstrNetworkName
  38. );
  39. HRESULT
  40. HrLoadCredentials(
  41. BSTR bstrMachine
  42. , IClusCfgSetCredentials * piCCSC
  43. );
  44. HRESULT
  45. HrGetNodeNameHostingResource(
  46. HCLUSTER hClusterIn
  47. , HRESOURCE hResIn
  48. , BSTR * pbstrNameOut
  49. );
  50. HRESULT
  51. HrGetNodeNameHostingCluster(
  52. HCLUSTER hClusterIn
  53. , BSTR * pbstrNodeName
  54. );
  55. HRESULT
  56. HrGetNetworkOfCluster(
  57. HCLUSTER hClusterIn
  58. , BSTR * pbstrNetworkName
  59. );
  60. HRESULT
  61. HrGetSCSIInfo(
  62. HRESOURCE hResIn
  63. , CLUS_SCSI_ADDRESS * pCSAOut
  64. , DWORD * pdwSignatureOut
  65. , DWORD * pdwDiskNumberOut
  66. );
  67. HRESULT
  68. HrGetClusterInformation(
  69. HCLUSTER hClusterIn
  70. , BSTR * pbstrClusterNameOut
  71. , CLUSTERVERSIONINFO * pcviOut
  72. );
  73. HRESULT
  74. HrGetClusterResourceState(
  75. HRESOURCE hResourceIn
  76. , BSTR * pbstrNodeNameOut
  77. , BSTR * pbstrGroupNameOut
  78. , CLUSTER_RESOURCE_STATE * pcrsStateOut
  79. );
  80. HRESULT
  81. HrGetClusterQuorumResource(
  82. HCLUSTER hClusterIn
  83. , BSTR * pbstrResourceNameOut
  84. , BSTR * pbstrDeviceNameOut
  85. , DWORD * pdwMaxQuorumLogSizeOut
  86. );
  87. //
  88. // String manipulation functions.
  89. //
  90. HRESULT
  91. HrSeparateDomainAndName(
  92. BSTR bstrNameIn
  93. , BSTR * pbstrDomainOut
  94. , BSTR * pbstrNameOut );
  95. HRESULT
  96. HrAppendDomainToName(
  97. BSTR bstrNameIn
  98. , BSTR bstrDomainIn
  99. , BSTR * pbstrDomainNameOut
  100. );
  101. //
  102. // Cluster helper functions.
  103. //
  104. HRESULT
  105. HrReplaceTokens(
  106. LPWSTR pwszStringInout
  107. , LPCWSTR pwszSearchTokensIn
  108. , WCHAR chReplaceTokenIn
  109. , DWORD * pcReplacementsOut
  110. );
  111. HRESULT
  112. HrGetMaxNodeCount(
  113. DWORD * pcMaxNodesOut
  114. );
  115. HRESULT
  116. HrGetReferenceStringFromHResult(
  117. HRESULT hrIn
  118. , BSTR * pbstrReferenceStringOut
  119. );
  120. HRESULT
  121. HrIsClusterServiceRunning( void );
  122. HRESULT
  123. HrCheckJoiningNodeVersion(
  124. PCWSTR pcwszClusterNameIn
  125. , DWORD dwNodeHighestVersionIn
  126. , DWORD dwNodeLowestVersionIn
  127. , IClusCfgCallback * pcccbIn
  128. );
  129. HRESULT
  130. HrGetNodeNames(
  131. HCLUSTER hClusterIn
  132. , long * pnCountOut
  133. , BSTR ** prgbstrNodeNamesOut
  134. );