ClusApi.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:72k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*++
  2. Copyright (c) Microsoft Corporation.  All rights reserved.
  3. Module Name:
  4.     clusapi.h
  5. Abstract:
  6.     This module defines the common management and application interface to
  7.     the Microsoft Cluster Server services.
  8. Revision History:
  9. --*/
  10. #ifndef _CLUSTER_API_
  11. #define _CLUSTER_API_
  12. #define CLUSAPI_VERSION 0x0500
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #ifndef MIDL_PASS
  20. #if _MSC_VER >= 1200
  21. #pragma warning(push)
  22. #endif
  23. #pragma warning( disable : 4200 ) // nonstandard extension used : zero-sized array in struct/union
  24. #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
  25. #endif // MIDL_PASS
  26. //
  27. // General cluster definitions
  28. //
  29. #ifndef _CLUSTER_API_TYPES_
  30. //
  31. // Defined cluster handle types.
  32. //
  33. typedef struct _HCLUSTER *HCLUSTER;
  34. typedef struct _HNODE *HNODE;
  35. typedef struct _HRESOURCE *HRESOURCE;
  36. typedef struct _HGROUP *HGROUP;
  37. //typedef struct _HRESTYPE *HRESTYPE;
  38. typedef struct _HNETWORK *HNETWORK;
  39. typedef struct _HNETINTERFACE *HNETINTERFACE;
  40. typedef struct _HCHANGE *HCHANGE;
  41. typedef struct _HCLUSENUM *HCLUSENUM;
  42. typedef struct _HGROUPENUM *HGROUPENUM;
  43. typedef struct _HRESENUM *HRESENUM;
  44. typedef struct _HNETWORKENUM *HNETWORKENUM;
  45. typedef struct _HNODEENUM *HNODEENUM;
  46. typedef struct _HRESTYPEENUM *HRESTYPEENUM;
  47. #endif // _CLUSTER_API_TYPES_
  48. //
  49. // Definitions used in cluster management routines.
  50. //
  51. #define MAX_CLUSTERNAME_LENGTH      MAX_COMPUTERNAME_LENGTH
  52. #ifndef _CLUSTER_API_TYPES_
  53. //
  54. // Cluster-related structures and types
  55. //
  56. typedef enum CLUSTER_QUORUM_TYPE {
  57.     OperationalQuorum,
  58.     ModifyQuorum
  59. } CLUSTER_QUORUM_TYPE;
  60. #ifndef MIDL_PASS
  61. typedef struct CLUSTERVERSIONINFO_NT4 {
  62.     DWORD dwVersionInfoSize;
  63.     WORD  MajorVersion;
  64.     WORD  MinorVersion;
  65.     WORD  BuildNumber;
  66.     WCHAR szVendorId[64];
  67.     WCHAR szCSDVersion[64];
  68. }CLUSTERVERSIONINFO_NT4, *PCLUSTERVERSIONINFO_NT4;
  69. typedef struct CLUSTERVERSIONINFO {
  70.     DWORD dwVersionInfoSize;
  71.     WORD  MajorVersion;
  72.     WORD  MinorVersion;
  73.     WORD  BuildNumber;
  74.     WCHAR szVendorId[64];
  75.     WCHAR szCSDVersion[64];
  76.     DWORD dwClusterHighestVersion;
  77.     DWORD dwClusterLowestVersion;
  78.     DWORD dwFlags;
  79.     DWORD dwReserved;
  80. } CLUSTERVERSIONINFO, *LPCLUSTERVERSIONINFO, *PCLUSTERVERSIONINFO;
  81. typedef struct CLUS_STARTING_PARAMS {
  82.     DWORD   dwSize;
  83.     BOOL    bForm;
  84.     BOOL    bFirst;
  85. } CLUS_STARTING_PARAMS, * PCLUS_STARTING_PARAMS;
  86. #define     CLUSTER_VERSION_FLAG_MIXED_MODE     0x00000001
  87. #define NT4_MAJOR_VERSION           1
  88. #define NT4SP4_MAJOR_VERSION        2
  89. #define NT5_MAJOR_VERSION           3
  90. #define NT51_MAJOR_VERSION          4
  91. #define CLUSTER_VERSION_UNKNOWN         0xFFFFFFFF
  92. //
  93. // Version number macros
  94. //
  95. #define CLUSTER_MAKE_VERSION( _maj, _min ) ((( _maj ) << 16 ) | ( _min ))
  96. #define CLUSTER_GET_MAJOR_VERSION( _ver ) (( _ver ) >> 16 )
  97. #define CLUSTER_GET_MINOR_VERSION( _ver ) (( _ver ) & 0xFFFF )
  98. //
  99. // Interfaces for the cluster state on a node
  100. //
  101. #define CLUSTER_INSTALLED   0x00000001
  102. #define CLUSTER_CONFIGURED  0x00000002
  103. #define CLUSTER_RUNNING     0x00000010
  104. typedef enum NODE_CLUSTER_STATE {
  105.     ClusterStateNotInstalled                = 0x00000000,
  106.     ClusterStateNotConfigured               = CLUSTER_INSTALLED,
  107.     ClusterStateNotRunning                  = CLUSTER_INSTALLED | CLUSTER_CONFIGURED,
  108.     ClusterStateRunning                     = CLUSTER_INSTALLED | CLUSTER_CONFIGURED | CLUSTER_RUNNING
  109. } NODE_CLUSTER_STATE;
  110. #endif // MIDL_PASS
  111. #endif // _CLUSTER_API_TYPES_
  112. //
  113. // Interfaces for managing clusters
  114. //
  115. //
  116. // Cluster API Specific Access Rights
  117. //
  118. #define CLUSAPI_READ_ACCESS     0x00000001L
  119. #define CLUSAPI_CHANGE_ACCESS   0x00000002L
  120. #define CLUSAPI_NO_ACCESS       0x00000004L
  121. #define CLUSAPI_ALL_ACCESS (CLUSAPI_READ_ACCESS | CLUSAPI_CHANGE_ACCESS)
  122. #ifndef MIDL_PASS
  123. DWORD
  124. WINAPI
  125. GetNodeClusterState(
  126.     IN  LPCWSTR lpszNodeName,
  127.     OUT DWORD   *pdwClusterState
  128.     );
  129. HCLUSTER
  130. WINAPI
  131. OpenCluster(
  132.     IN LPCWSTR lpszClusterName
  133.     );
  134. BOOL
  135. WINAPI
  136. CloseCluster(
  137.     IN HCLUSTER hCluster
  138.     );
  139. DWORD
  140. WINAPI
  141. SetClusterName(
  142.     IN HCLUSTER hCluster,
  143.     IN LPCWSTR lpszNewClusterName
  144.     );
  145. DWORD
  146. WINAPI
  147. GetClusterInformation(
  148.     IN HCLUSTER hCluster,
  149.     OUT LPWSTR lpszClusterName,
  150.     IN OUT LPDWORD lpcchClusterName,
  151.     OUT OPTIONAL LPCLUSTERVERSIONINFO lpClusterInfo
  152.     );
  153. DWORD
  154. WINAPI
  155. GetClusterQuorumResource(
  156.     IN HCLUSTER     hCluster,
  157.     OUT LPWSTR      lpszResourceName,
  158.     IN OUT LPDWORD  lpcchResourceName,
  159.     OUT LPWSTR      lpszDeviceName,
  160.     IN OUT LPDWORD  lpcchDeviceName,
  161.     OUT LPDWORD     lpdwMaxQuorumLogSize
  162.     );
  163. DWORD
  164. WINAPI
  165. SetClusterQuorumResource(
  166.     IN HRESOURCE hResource,
  167.     IN LPCWSTR   lpszDeviceName,
  168.     IN DWORD     dwMaxQuoLogSize
  169.     );
  170. DWORD
  171. WINAPI
  172. BackupClusterDatabase(
  173.     IN HCLUSTER hCluster,
  174.     IN LPCWSTR  lpszPathName
  175.     );
  176. DWORD
  177. WINAPI
  178. RestoreClusterDatabase(
  179.     IN LPCWSTR  lpszPathName,
  180.     IN BOOL     bForce,
  181.     IN OPTIONAL LPCWSTR  lpszQuorumDriveLetter
  182.     );
  183. DWORD
  184. WINAPI
  185. SetClusterNetworkPriorityOrder(
  186.     IN HCLUSTER hCluster,
  187.     IN DWORD NetworkCount,
  188.     IN HNETWORK NetworkList[]
  189.     );
  190. DWORD
  191. WINAPI
  192. ClusterControl(
  193.     IN HCLUSTER hCluster,
  194.     IN OPTIONAL HNODE hHostNode,
  195.     IN DWORD dwControlCode,
  196.     IN LPVOID lpInBuffer,
  197.     IN DWORD nInBufferSize,
  198.     OUT LPVOID lpOutBuffer,
  199.     IN DWORD nOutBufferSize,
  200.     OUT LPDWORD lpBytesReturned
  201.     );
  202. #endif // MIDL_PASS
  203. //
  204. // Cluster Event Notification API
  205. //
  206. #ifndef _CLUSTER_API_TYPES_
  207. //
  208. // Cluster event filter flags.
  209. //
  210. typedef enum CLUSTER_CHANGE {
  211.     CLUSTER_CHANGE_NODE_STATE               = 0x00000001,
  212.     CLUSTER_CHANGE_NODE_DELETED             = 0x00000002,
  213.     CLUSTER_CHANGE_NODE_ADDED               = 0x00000004,
  214.     CLUSTER_CHANGE_NODE_PROPERTY            = 0x00000008,
  215.     CLUSTER_CHANGE_REGISTRY_NAME            = 0x00000010,
  216.     CLUSTER_CHANGE_REGISTRY_ATTRIBUTES      = 0x00000020,
  217.     CLUSTER_CHANGE_REGISTRY_VALUE           = 0x00000040,
  218.     CLUSTER_CHANGE_REGISTRY_SUBTREE         = 0x00000080,
  219.     CLUSTER_CHANGE_RESOURCE_STATE           = 0x00000100,
  220.     CLUSTER_CHANGE_RESOURCE_DELETED         = 0x00000200,
  221.     CLUSTER_CHANGE_RESOURCE_ADDED           = 0x00000400,
  222.     CLUSTER_CHANGE_RESOURCE_PROPERTY        = 0x00000800,
  223.     CLUSTER_CHANGE_GROUP_STATE              = 0x00001000,
  224.     CLUSTER_CHANGE_GROUP_DELETED            = 0x00002000,
  225.     CLUSTER_CHANGE_GROUP_ADDED              = 0x00004000,
  226.     CLUSTER_CHANGE_GROUP_PROPERTY           = 0x00008000,
  227.     CLUSTER_CHANGE_RESOURCE_TYPE_DELETED    = 0x00010000,
  228.     CLUSTER_CHANGE_RESOURCE_TYPE_ADDED      = 0x00020000,
  229.     CLUSTER_CHANGE_RESOURCE_TYPE_PROPERTY   = 0x00040000,
  230.     CLUSTER_CHANGE_CLUSTER_RECONNECT        = 0x00080000,
  231.     CLUSTER_CHANGE_NETWORK_STATE            = 0x00100000,
  232.     CLUSTER_CHANGE_NETWORK_DELETED          = 0x00200000,
  233.     CLUSTER_CHANGE_NETWORK_ADDED            = 0x00400000,
  234.     CLUSTER_CHANGE_NETWORK_PROPERTY         = 0x00800000,
  235.     CLUSTER_CHANGE_NETINTERFACE_STATE       = 0x01000000,
  236.     CLUSTER_CHANGE_NETINTERFACE_DELETED     = 0x02000000,
  237.     CLUSTER_CHANGE_NETINTERFACE_ADDED       = 0x04000000,
  238.     CLUSTER_CHANGE_NETINTERFACE_PROPERTY    = 0x08000000,
  239.     CLUSTER_CHANGE_QUORUM_STATE             = 0x10000000,
  240.     CLUSTER_CHANGE_CLUSTER_STATE            = 0x20000000,
  241.     CLUSTER_CHANGE_CLUSTER_PROPERTY         = 0x40000000,
  242.     CLUSTER_CHANGE_HANDLE_CLOSE             = 0x80000000,
  243.     CLUSTER_CHANGE_ALL                      = (CLUSTER_CHANGE_NODE_STATE                |
  244.                                                CLUSTER_CHANGE_NODE_DELETED              |
  245.                                                CLUSTER_CHANGE_NODE_ADDED                |
  246.                                                CLUSTER_CHANGE_NODE_PROPERTY             |
  247.                                                CLUSTER_CHANGE_REGISTRY_NAME             |
  248.                                                CLUSTER_CHANGE_REGISTRY_ATTRIBUTES       |
  249.                                                CLUSTER_CHANGE_REGISTRY_VALUE            |
  250.                                                CLUSTER_CHANGE_REGISTRY_SUBTREE          |
  251.                                                CLUSTER_CHANGE_RESOURCE_STATE            |
  252.                                                CLUSTER_CHANGE_RESOURCE_DELETED          |
  253.                                                CLUSTER_CHANGE_RESOURCE_ADDED            |
  254.                                                CLUSTER_CHANGE_RESOURCE_PROPERTY         |
  255.                                                CLUSTER_CHANGE_GROUP_STATE               |
  256.                                                CLUSTER_CHANGE_GROUP_DELETED             |
  257.                                                CLUSTER_CHANGE_GROUP_ADDED               |
  258.                                                CLUSTER_CHANGE_GROUP_PROPERTY            |
  259.                                                CLUSTER_CHANGE_RESOURCE_TYPE_DELETED     |
  260.                                                CLUSTER_CHANGE_RESOURCE_TYPE_ADDED       |
  261.                                                CLUSTER_CHANGE_RESOURCE_TYPE_PROPERTY    |
  262.                                                CLUSTER_CHANGE_NETWORK_STATE             |
  263.                                                CLUSTER_CHANGE_NETWORK_DELETED           |
  264.                                                CLUSTER_CHANGE_NETWORK_ADDED             |
  265.                                                CLUSTER_CHANGE_NETWORK_PROPERTY          |
  266.                                                CLUSTER_CHANGE_NETINTERFACE_STATE        |
  267.                                                CLUSTER_CHANGE_NETINTERFACE_DELETED      |
  268.                                                CLUSTER_CHANGE_NETINTERFACE_ADDED        |
  269.                                                CLUSTER_CHANGE_NETINTERFACE_PROPERTY     |
  270.                                                CLUSTER_CHANGE_QUORUM_STATE              |
  271.                                                CLUSTER_CHANGE_CLUSTER_STATE             |
  272.                                                CLUSTER_CHANGE_CLUSTER_PROPERTY          |
  273.                                                CLUSTER_CHANGE_CLUSTER_RECONNECT         |
  274.                                                CLUSTER_CHANGE_HANDLE_CLOSE)
  275. } CLUSTER_CHANGE;
  276. #endif // _CLUSTER_API_TYPES_
  277. #ifndef MIDL_PASS
  278. HCHANGE
  279. WINAPI
  280. CreateClusterNotifyPort(
  281.     IN OPTIONAL HCHANGE hChange,
  282.     IN OPTIONAL HCLUSTER hCluster,
  283.     IN DWORD dwFilter,
  284.     IN DWORD_PTR dwNotifyKey
  285.     );
  286. DWORD
  287. WINAPI
  288. RegisterClusterNotify(
  289.     IN HCHANGE hChange,
  290.     IN DWORD dwFilterType,
  291.     IN HANDLE hObject,
  292.     IN DWORD_PTR dwNotifyKey
  293.     );
  294. DWORD
  295. WINAPI
  296. GetClusterNotify(
  297.     IN HCHANGE hChange,
  298.     OUT DWORD_PTR *lpdwNotifyKey,
  299.     OUT LPDWORD lpdwFilterType,
  300.     OUT OPTIONAL LPWSTR lpszName,
  301.     IN OUT LPDWORD lpcchName,
  302.     IN DWORD dwMilliseconds
  303.     );
  304. BOOL
  305. WINAPI
  306. CloseClusterNotifyPort(
  307.     IN HCHANGE hChange
  308.     );
  309. #endif // MIDL_PASS
  310. //
  311. // Enumeration routines
  312. //
  313. #ifndef _CLUSTER_API_TYPES_
  314. //
  315. // Define enumerable types
  316. //
  317. typedef enum CLUSTER_ENUM {
  318.     CLUSTER_ENUM_NODE               = 0x00000001,
  319.     CLUSTER_ENUM_RESTYPE            = 0x00000002,
  320.     CLUSTER_ENUM_RESOURCE           = 0x00000004,
  321.     CLUSTER_ENUM_GROUP              = 0x00000008,
  322.     CLUSTER_ENUM_NETWORK            = 0x00000010,
  323.     CLUSTER_ENUM_NETINTERFACE       = 0x00000020,
  324.     CLUSTER_ENUM_INTERNAL_NETWORK   = 0x80000000,
  325.     CLUSTER_ENUM_ALL                = (CLUSTER_ENUM_NODE      |
  326.                                        CLUSTER_ENUM_RESTYPE   |
  327.                                        CLUSTER_ENUM_RESOURCE  |
  328.                                        CLUSTER_ENUM_GROUP     |
  329.                                        CLUSTER_ENUM_NETWORK   |
  330.                                        CLUSTER_ENUM_NETINTERFACE)
  331. } CLUSTER_ENUM;
  332. #endif // _CLUSTER_API_TYPES_
  333. #ifndef MIDL_PASS
  334. HCLUSENUM
  335. WINAPI
  336. ClusterOpenEnum(
  337.     IN HCLUSTER hCluster,
  338.     IN DWORD dwType
  339.     );
  340. DWORD
  341. WINAPI
  342. ClusterGetEnumCount(
  343.     IN HCLUSENUM hEnum
  344.     );
  345. DWORD
  346. WINAPI
  347. ClusterEnum(
  348.     IN HCLUSENUM hEnum,
  349.     IN DWORD dwIndex,
  350.     OUT LPDWORD lpdwType,
  351.     OUT LPWSTR lpszName,
  352.     IN OUT LPDWORD lpcchName
  353.     );
  354. DWORD
  355. WINAPI
  356. ClusterCloseEnum(
  357.     IN HCLUSENUM hEnum
  358.     );
  359. #endif // MIDL_PASS
  360. #ifndef _CLUSTER_API_TYPES_
  361. //
  362. // Define enumerable node types
  363. //
  364. typedef enum CLUSTER_NODE_ENUM {
  365.     CLUSTER_NODE_ENUM_NETINTERFACES = 0x00000001,
  366.     CLUSTER_NODE_ENUM_ALL           = (CLUSTER_NODE_ENUM_NETINTERFACES)
  367. } CLUSTER_NODE_ENUM;
  368. //
  369. // Node-related structures and types.
  370. //
  371. typedef enum CLUSTER_NODE_STATE {
  372.     ClusterNodeStateUnknown = -1,
  373.     ClusterNodeUp,
  374.     ClusterNodeDown,
  375.     ClusterNodePaused,
  376.     ClusterNodeJoining
  377. } CLUSTER_NODE_STATE;
  378. #endif // _CLUSTER_API_TYPES_
  379. //
  380. // Interfaces for managing the nodes of a cluster.
  381. //
  382. #ifndef MIDL_PASS
  383. HNODE
  384. WINAPI
  385. OpenClusterNode(
  386.     IN HCLUSTER hCluster,
  387.     IN LPCWSTR lpszNodeName
  388.     );
  389. BOOL
  390. WINAPI
  391. CloseClusterNode(
  392.     IN HNODE hNode
  393.     );
  394. CLUSTER_NODE_STATE
  395. WINAPI
  396. GetClusterNodeState(
  397.     IN HNODE hNode
  398.     );
  399. DWORD
  400. WINAPI
  401. GetClusterNodeId(
  402.     IN HNODE hNode,
  403.     OUT LPWSTR lpszNodeId,
  404.     IN OUT LPDWORD lpcchName
  405.     );
  406. #define GetCurrentClusterNodeId(_lpszNodeId_, _lpcchName_) 
  407.     GetClusterNodeId(NULL, (_lpszNodeId_), (_lpcchName_))
  408. HCLUSTER
  409. WINAPI
  410. GetClusterFromNode(
  411.     IN HNODE hNode
  412.     );
  413. DWORD
  414. WINAPI
  415. PauseClusterNode(
  416.     IN HNODE hNode
  417.     );
  418. DWORD
  419. WINAPI
  420. ResumeClusterNode(
  421.     IN HNODE hNode
  422.     );
  423. DWORD
  424. WINAPI
  425. EvictClusterNode(
  426.     IN HNODE hNode
  427.     );
  428. HNODEENUM
  429. WINAPI
  430. ClusterNodeOpenEnum(
  431.     IN HNODE hNode,
  432.     IN DWORD dwType
  433.     );
  434. DWORD
  435. WINAPI
  436. ClusterNodeGetEnumCount(
  437.     IN HNODEENUM hNodeEnum
  438.     );
  439. DWORD
  440. WINAPI
  441. ClusterNodeCloseEnum(
  442.     IN HNODEENUM hNodeEnum
  443.     );
  444. DWORD
  445. WINAPI
  446. ClusterNodeEnum(
  447.     IN HNODEENUM hNodeEnum,
  448.     IN DWORD dwIndex,
  449.     OUT LPDWORD lpdwType,
  450.     OUT LPWSTR lpszName,
  451.     IN OUT LPDWORD lpcchName
  452.     );
  453. DWORD
  454. WINAPI
  455. EvictClusterNodeEx(
  456.     IN HNODE hNode,
  457.     IN DWORD dwTimeOut,
  458.     OUT HRESULT* phrCleanupStatus
  459.     );
  460. #endif // MIDL_PASS
  461. //
  462. // Interfaces for managing the resource types in a cluster
  463. //
  464. #ifndef MIDL_PASS
  465. HKEY
  466. WINAPI
  467. GetClusterResourceTypeKey(
  468.     IN HCLUSTER hCluster,
  469.     IN LPCWSTR lpszTypeName,
  470.     IN REGSAM samDesired
  471.     );
  472. #endif // MIDL_PASS
  473. #ifndef _CLUSTER_API_TYPES_
  474. //
  475. // Define enumerable group types
  476. //
  477. typedef enum CLUSTER_GROUP_ENUM {
  478.     CLUSTER_GROUP_ENUM_CONTAINS     = 0x00000001,
  479.     CLUSTER_GROUP_ENUM_NODES        = 0x00000002,
  480.     CLUSTER_GROUP_ENUM_ALL          = (CLUSTER_GROUP_ENUM_CONTAINS |
  481.                                        CLUSTER_GROUP_ENUM_NODES)
  482. } CLUSTER_GROUP_ENUM;
  483. //
  484. // Interfaces for managing the failover groups in a cluster.
  485. //
  486. typedef enum CLUSTER_GROUP_STATE {
  487.     ClusterGroupStateUnknown = -1,
  488.     ClusterGroupOnline,
  489.     ClusterGroupOffline,
  490.     ClusterGroupFailed,
  491.     ClusterGroupPartialOnline,
  492.     ClusterGroupPending
  493. } CLUSTER_GROUP_STATE;
  494. typedef enum CLUSTER_GROUP_AUTOFAILBACK_TYPE
  495. {
  496.     ClusterGroupPreventFailback = 0,
  497.     ClusterGroupAllowFailback,
  498.     ClusterGroupFailbackTypeCount
  499. } CLUSTER_GROUP_AUTOFAILBACK_TYPE, CGAFT;
  500. #endif // _CLUSTER_API_TYPES_
  501. #ifndef MIDL_PASS
  502. HGROUP
  503. WINAPI
  504. CreateClusterGroup(
  505.     IN HCLUSTER hCluster,
  506.     IN LPCWSTR lpszGroupName
  507.     );
  508. HGROUP
  509. WINAPI
  510. OpenClusterGroup(
  511.     IN HCLUSTER hCluster,
  512.     IN LPCWSTR lpszGroupName
  513.     );
  514. BOOL
  515. WINAPI
  516. CloseClusterGroup(
  517.     IN HGROUP hGroup
  518.     );
  519. HCLUSTER
  520. WINAPI
  521. GetClusterFromGroup(
  522.     IN HGROUP hGroup
  523.     );
  524. CLUSTER_GROUP_STATE
  525. WINAPI
  526. GetClusterGroupState(
  527.     IN HGROUP hGroup,
  528.     OUT OPTIONAL LPWSTR lpszNodeName,
  529.     IN OUT LPDWORD lpcchNodeName
  530.     );
  531. DWORD
  532. WINAPI
  533. SetClusterGroupName(
  534.     IN HGROUP hGroup,
  535.     IN LPCWSTR lpszGroupName
  536.     );
  537. DWORD
  538. WINAPI
  539. SetClusterGroupNodeList(
  540.     IN HGROUP hGroup,
  541.     IN DWORD NodeCount,
  542.     IN HNODE NodeList[]
  543.     );
  544. DWORD
  545. WINAPI
  546. OnlineClusterGroup(
  547.     IN HGROUP hGroup,
  548.     IN OPTIONAL HNODE hDestinationNode
  549.     );
  550. DWORD
  551. WINAPI
  552. MoveClusterGroup(
  553.     IN HGROUP hGroup,
  554.     IN OPTIONAL HNODE hDestinationNode
  555.     );
  556. DWORD
  557. WINAPI
  558. OfflineClusterGroup(
  559.     IN HGROUP hGroup
  560.     );
  561. DWORD
  562. WINAPI
  563. DeleteClusterGroup(
  564.     IN HGROUP hGroup
  565.     );
  566. HGROUPENUM
  567. WINAPI
  568. ClusterGroupOpenEnum(
  569.     IN HGROUP hGroup,
  570.     IN DWORD dwType
  571.     );
  572. DWORD
  573. WINAPI
  574. ClusterGroupGetEnumCount(
  575.     IN HGROUPENUM hGroupEnum
  576.     );
  577. DWORD
  578. WINAPI
  579. ClusterGroupEnum(
  580.     IN HGROUPENUM hGroupEnum,
  581.     IN DWORD dwIndex,
  582.     OUT LPDWORD lpdwType,
  583.     OUT LPWSTR lpszResourceName,
  584.     IN OUT LPDWORD lpcchName
  585.     );
  586. DWORD
  587. WINAPI
  588. ClusterGroupCloseEnum(
  589.     IN HGROUPENUM hGroupEnum
  590.     );
  591. #endif // MIDL_PASS
  592. //
  593. // Definitions used in resource management routines.
  594. //
  595. #ifndef _CLUSTER_API_TYPES_
  596. //
  597. // Resource-related structures and types
  598. //
  599. typedef enum CLUSTER_RESOURCE_STATE {
  600.     ClusterResourceStateUnknown = -1,
  601.     ClusterResourceInherited,
  602.     ClusterResourceInitializing,
  603.     ClusterResourceOnline,
  604.     ClusterResourceOffline,
  605.     ClusterResourceFailed,
  606.     ClusterResourcePending = 128,
  607.     ClusterResourceOnlinePending,
  608.     ClusterResourceOfflinePending
  609. } CLUSTER_RESOURCE_STATE;
  610. typedef enum CLUSTER_RESOURCE_RESTART_ACTION {
  611.     ClusterResourceDontRestart = 0,
  612.     ClusterResourceRestartNoNotify,
  613.     ClusterResourceRestartNotify,
  614.     ClusterResourceRestartActionCount
  615. } CLUSTER_RESOURCE_RESTART_ACTION, CRRA;
  616. //
  617. // Flags for resource creation
  618. //
  619. typedef enum CLUSTER_RESOURCE_CREATE_FLAGS {
  620.     CLUSTER_RESOURCE_DEFAULT_MONITOR   = 0,
  621.     CLUSTER_RESOURCE_SEPARATE_MONITOR  = 1,
  622.     CLUSTER_RESOURCE_VALID_FLAGS       = CLUSTER_RESOURCE_SEPARATE_MONITOR
  623. } CLUSTER_RESOURCE_CREATE_FLAGS;
  624. #endif // _CLUSTER_API_TYPES_
  625. //
  626. // Interfaces for managing the resources in a cluster
  627. //
  628. #ifndef MIDL_PASS
  629. HRESOURCE
  630. WINAPI
  631. CreateClusterResource(
  632.     IN HGROUP hGroup,
  633.     IN LPCWSTR lpszResourceName,
  634.     IN LPCWSTR lpszResourceType,
  635.     IN DWORD dwFlags
  636.     );
  637. HRESOURCE
  638. WINAPI
  639. OpenClusterResource(
  640.     IN HCLUSTER hCluster,
  641.     IN LPCWSTR lpszResourceName
  642.     );
  643. BOOL
  644. WINAPI
  645. CloseClusterResource(
  646.     IN HRESOURCE hResource
  647.     );
  648. HCLUSTER
  649. WINAPI
  650. GetClusterFromResource(
  651.     IN HRESOURCE hResource
  652.     );
  653. DWORD
  654. WINAPI
  655. DeleteClusterResource(
  656.     IN HRESOURCE hResource
  657.     );
  658. CLUSTER_RESOURCE_STATE
  659. WINAPI
  660. GetClusterResourceState(
  661.     IN HRESOURCE hResource,
  662.     OUT OPTIONAL LPWSTR lpszNodeName,
  663.     IN OUT LPDWORD lpcchNodeName,
  664.     OUT OPTIONAL LPWSTR lpszGroupName,
  665.     IN OUT LPDWORD lpcchGroupName
  666.     );
  667. DWORD
  668. WINAPI
  669. SetClusterResourceName(
  670.     IN HRESOURCE hResource,
  671.     IN LPCWSTR lpszResourceName
  672.     );
  673. DWORD
  674. WINAPI
  675. FailClusterResource(
  676.     IN HRESOURCE hResource
  677.     );
  678. DWORD
  679. WINAPI
  680. OnlineClusterResource(
  681.     IN HRESOURCE hResource
  682.     );
  683. DWORD
  684. WINAPI
  685. OfflineClusterResource(
  686.     IN HRESOURCE hResource
  687.     );
  688. DWORD
  689. WINAPI
  690. ChangeClusterResourceGroup(
  691.     IN HRESOURCE hResource,
  692.     IN HGROUP hGroup
  693.     );
  694. DWORD
  695. WINAPI
  696. AddClusterResourceNode(
  697.     IN HRESOURCE hResource,
  698.     IN HNODE hNode
  699.     );
  700. DWORD
  701. WINAPI
  702. RemoveClusterResourceNode(
  703.     IN HRESOURCE hResource,
  704.     IN HNODE hNode
  705.     );
  706. DWORD
  707. WINAPI
  708. AddClusterResourceDependency(
  709.     IN HRESOURCE hResource,
  710.     IN HRESOURCE hDependsOn
  711.     );
  712. DWORD
  713. WINAPI
  714. RemoveClusterResourceDependency(
  715.     IN HRESOURCE hResource,
  716.     IN HRESOURCE hDependsOn
  717.     );
  718. BOOL
  719. WINAPI
  720. CanResourceBeDependent(
  721.     IN HRESOURCE hResource,
  722.     IN HRESOURCE hResourceDependent
  723.     );
  724. DWORD
  725. WINAPI
  726. ClusterResourceControl(
  727.     IN HRESOURCE hResource,
  728.     IN OPTIONAL HNODE hHostNode,
  729.     IN DWORD dwControlCode,
  730.     IN LPVOID lpInBuffer,
  731.     IN DWORD cbInBufferSize,
  732.     OUT LPVOID lpOutBuffer,
  733.     IN DWORD cbOutBufferSize,
  734.     OUT LPDWORD lpcbBytesReturned
  735.     );
  736. DWORD
  737. WINAPI
  738. ClusterResourceTypeControl(
  739.     IN HCLUSTER hCluster,
  740.     IN LPCWSTR ResourceTypeName,
  741.     IN OPTIONAL HNODE hHostNode,
  742.     IN DWORD dwControlCode,
  743.     IN LPVOID lpInBuffer,
  744.     IN DWORD cbInBufferSize,
  745.     OUT LPVOID lpOutBuffer,
  746.     IN DWORD cbOutBufferSize,
  747.     OUT LPDWORD lpcbBytesReturned
  748.     );
  749. DWORD
  750. WINAPI
  751. ClusterGroupControl(
  752.     IN HGROUP hGroup,
  753.     IN OPTIONAL HNODE hHostNode,
  754.     IN DWORD dwControlCode,
  755.     IN LPVOID lpInBuffer,
  756.     IN DWORD cbInBufferSize,
  757.     OUT LPVOID lpOutBuffer,
  758.     IN DWORD cbOutBufferSize,
  759.     OUT LPDWORD lpcbBytesReturned
  760.     );
  761. DWORD
  762. WINAPI
  763. ClusterNodeControl(
  764.     IN HNODE hNode,
  765.     IN OPTIONAL HNODE hHostNode,
  766.     IN DWORD dwControlCode,
  767.     IN LPVOID lpInBuffer,
  768.     IN DWORD cbInBufferSize,
  769.     OUT LPVOID lpOutBuffer,
  770.     IN DWORD cbOutBufferSize,
  771.     OUT LPDWORD lpcbBytesReturned
  772.     );
  773. BOOL
  774. WINAPI
  775. GetClusterResourceNetworkName(
  776.     IN HRESOURCE hResource,
  777.     OUT LPWSTR lpBuffer,
  778.     IN OUT LPDWORD nSize
  779.     );
  780. #endif // MIDL_PASS
  781. //
  782. // Cluster control properties
  783. //
  784. #ifndef _CLUSTER_API_TYPES_
  785. //
  786. // Cluster Control Property Data - Types (a WORD)
  787. //
  788. typedef enum CLUSTER_PROPERTY_TYPE {
  789.     CLUSPROP_TYPE_UNKNOWN = -1,
  790.     CLUSPROP_TYPE_ENDMARK = 0,
  791.     CLUSPROP_TYPE_LIST_VALUE,
  792.     CLUSPROP_TYPE_RESCLASS,
  793.     CLUSPROP_TYPE_RESERVED1,
  794.     CLUSPROP_TYPE_NAME,
  795.     CLUSPROP_TYPE_SIGNATURE,
  796.     CLUSPROP_TYPE_SCSI_ADDRESS,
  797.     CLUSPROP_TYPE_DISK_NUMBER,
  798.     CLUSPROP_TYPE_PARTITION_INFO,
  799.     CLUSPROP_TYPE_FTSET_INFO,
  800.     CLUSPROP_TYPE_DISK_SERIALNUMBER,
  801.     CLUSPROP_TYPE_USER=32768
  802. } CLUSTER_PROPERTY_TYPE;
  803. //
  804. // Cluster Control Property Data - Formats (a WORD)
  805. //
  806. typedef enum CLUSTER_PROPERTY_FORMAT {
  807.     CLUSPROP_FORMAT_UNKNOWN = 0,
  808.     CLUSPROP_FORMAT_BINARY,
  809.     CLUSPROP_FORMAT_DWORD,
  810.     CLUSPROP_FORMAT_SZ,
  811.     CLUSPROP_FORMAT_EXPAND_SZ,
  812.     CLUSPROP_FORMAT_MULTI_SZ,
  813.     CLUSPROP_FORMAT_ULARGE_INTEGER,
  814.     CLUSPROP_FORMAT_LONG,
  815.     CLUSPROP_FORMAT_EXPANDED_SZ,
  816.     CLUSPROP_FORMAT_SECURITY_DESCRIPTOR,
  817.     CLUSPROP_FORMAT_LARGE_INTEGER,
  818.     CLUSPROP_FORMAT_WORD,
  819.     CLUSPROP_FORMAT_USER=32768
  820. } CLUSTER_PROPERTY_FORMAT;
  821. #endif // _CLUSTER_API_TYPES_
  822. //
  823. // Cluster Control Property Data - Syntax
  824. //
  825. #define CLUSPROP_SYNTAX_VALUE( type, format ) ((DWORD) ((type << 16) | format))
  826. #ifndef _CLUSTER_API_TYPES_
  827. typedef enum CLUSTER_PROPERTY_SYNTAX {
  828.     CLUSPROP_SYNTAX_ENDMARK         = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_ENDMARK, CLUSPROP_FORMAT_UNKNOWN ),
  829.     CLUSPROP_SYNTAX_NAME            = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_NAME, CLUSPROP_FORMAT_SZ ),
  830.     CLUSPROP_SYNTAX_RESCLASS        = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_RESCLASS, CLUSPROP_FORMAT_DWORD ),
  831.     CLUSPROP_SYNTAX_LIST_VALUE_SZ                   = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_SZ ),
  832.     CLUSPROP_SYNTAX_LIST_VALUE_EXPAND_SZ            = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_EXPAND_SZ ),
  833.     CLUSPROP_SYNTAX_LIST_VALUE_DWORD                = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_DWORD ),
  834.     CLUSPROP_SYNTAX_LIST_VALUE_BINARY               = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_BINARY ),
  835.     CLUSPROP_SYNTAX_LIST_VALUE_MULTI_SZ             = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_MULTI_SZ ),
  836.     CLUSPROP_SYNTAX_LIST_VALUE_LONG                 = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_LONG ),
  837.     CLUSPROP_SYNTAX_LIST_VALUE_EXPANDED_SZ          = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_EXPANDED_SZ ),
  838.     CLUSPROP_SYNTAX_LIST_VALUE_SECURITY_DESCRIPTOR  = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_SECURITY_DESCRIPTOR ),
  839.     CLUSPROP_SYNTAX_LIST_VALUE_LARGE_INTEGER        = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_LIST_VALUE, CLUSPROP_FORMAT_LARGE_INTEGER ),
  840.     // Storage syntax values
  841.     CLUSPROP_SYNTAX_DISK_SIGNATURE      = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_SIGNATURE, CLUSPROP_FORMAT_DWORD ),
  842.     CLUSPROP_SYNTAX_SCSI_ADDRESS        = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_SCSI_ADDRESS, CLUSPROP_FORMAT_DWORD ),
  843.     CLUSPROP_SYNTAX_DISK_NUMBER         = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_DISK_NUMBER, CLUSPROP_FORMAT_DWORD ),
  844.     CLUSPROP_SYNTAX_PARTITION_INFO      = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_PARTITION_INFO, CLUSPROP_FORMAT_BINARY ),
  845.     CLUSPROP_SYNTAX_FTSET_INFO          = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_FTSET_INFO, CLUSPROP_FORMAT_BINARY ),
  846.     CLUSPROP_SYNTAX_DISK_SERIALNUMBER   = CLUSPROP_SYNTAX_VALUE( CLUSPROP_TYPE_DISK_SERIALNUMBER, CLUSPROP_FORMAT_SZ )
  847. } CLUSTER_PROPERTY_SYNTAX;
  848. #endif // _CLUSTER_API_TYPES_
  849. //
  850. // Define Cluster Control Code access methods
  851. //
  852. #define CLUS_ACCESS_ANY        0
  853. #define CLUS_ACCESS_READ    0x01
  854. #define CLUS_ACCESS_WRITE   0x02
  855. //
  856. // Define Cluster Control Code modification actions
  857. //
  858. #define CLUS_NO_MODIFY      0
  859. #define CLUS_MODIFY         0x01
  860. //
  861. // Define Cluster Control Code Global actions
  862. //
  863. #define CLUS_NOT_GLOBAL     0
  864. #define CLUS_GLOBAL         0x01
  865. #ifndef _CLUSTER_API_TYPES_
  866. //
  867. // Define Cluster Control Code target objects
  868. //
  869. typedef enum CLUSTER_CONTROL_OBJECT {
  870.     CLUS_OBJECT_INVALID=0,
  871.     CLUS_OBJECT_RESOURCE,
  872.     CLUS_OBJECT_RESOURCE_TYPE,
  873.     CLUS_OBJECT_GROUP,
  874.     CLUS_OBJECT_NODE,
  875.     CLUS_OBJECT_NETWORK,
  876.     CLUS_OBJECT_NETINTERFACE,
  877.     CLUS_OBJECT_CLUSTER,
  878.     CLUS_OBJECT_USER=128
  879. } CLUSTER_CONTROL_OBJECT;
  880. #endif // _CLUSTER_API_TYPES_
  881. //
  882. // Macro to generate full cluster control codes
  883. //
  884. //  31      24 23 22 21 20 19       16 15                    2 1    0
  885. // +----------+--+--+--+--+-----------+-----------------------+------+
  886. // |  OBJECT  |G |M |U |I       CLUSTER CONTROL CODES         |ACCESS|
  887. // +----------+--+--+--+--+-----------+-----------------------+------+
  888. //
  889. // OBJECT - Object identifier (8 bits)
  890. // G - Global bit (operation must be performed on all nodes of cluster)
  891. // M - Modify bit (code causes a modification, may cause event notification)
  892. // U - User code bit (splits the control codes into 2 spaces each 2^^19 in size)
  893. // I - Internal code bit (only for non-user control codes)
  894. // CLUSTER CONTROL CODES - 2^^18 (256 thousand possible control codes)
  895. // ACCESS - Access mode (2 bits)
  896. //
  897. //
  898. // Define control code shifts
  899. //
  900. #define CLUSCTL_ACCESS_SHIFT         0
  901. #define CLUSCTL_FUNCTION_SHIFT       2
  902. #define CLCTL_INTERNAL_SHIFT        20
  903. #define CLCTL_USER_SHIFT            21
  904. #define CLCTL_MODIFY_SHIFT          22
  905. #define CLCTL_GLOBAL_SHIFT          23
  906. #define CLUSCTL_OBJECT_SHIFT        24
  907. //
  908. // Define control code masks
  909. //
  910. #define CLCTL_INTERNAL_MASK             (1<<CLCTL_INTERNAL_SHIFT)
  911. #define CLCTL_USER_MASK                 (1<<CLCTL_USER_SHIFT)
  912. #define CLCTL_MODIFY_MASK               (1<<CLCTL_MODIFY_SHIFT)
  913. #define CLCTL_GLOBAL_MASK               (1<<CLCTL_GLOBAL_SHIFT)
  914. #define CLUSCTL_CONTROL_CODE_MASK       0x3FFFFF // Includes access mask
  915. #define CLUSCTL_OBJECT_MASK             0xFF
  916. #define CLUSCTL_ACCESS_MODE_MASK        0x03
  917. //
  918. // Cluster Control function codes (a DWORD)
  919. //
  920. #define CLCTL_CLUSTER_BASE  0           // Start of cluster defined functions
  921. #define CLCTL_USER_BASE     (1<<CLCTL_USER_SHIFT) // Start of user functions
  922. #define CLCTL_EXTERNAL_CODE( Function, Access, Modify ) ( 
  923.     ((Access) << CLUSCTL_ACCESS_SHIFT) | 
  924.     ((CLCTL_CLUSTER_BASE + Function) << CLUSCTL_FUNCTION_SHIFT) | 
  925.     ((Modify) << CLCTL_MODIFY_SHIFT) )
  926. #define CLCTL_INTERNAL_CODE( Function, Access, Modify ) ( 
  927.     ((Access) << CLUSCTL_ACCESS_SHIFT) | 
  928.     CLCTL_INTERNAL_MASK | 
  929.     ((CLCTL_CLUSTER_BASE + Function) << CLUSCTL_FUNCTION_SHIFT) | 
  930.     ((Modify) << CLCTL_MODIFY_SHIFT) )
  931. #ifndef _CLUSTER_API_TYPES_
  932. typedef enum CLCTL_CODES {
  933.     //
  934.     // External control codes
  935.     //
  936.     CLCTL_UNKNOWN                           = CLCTL_EXTERNAL_CODE( 0, CLUS_ACCESS_ANY, CLUS_NO_MODIFY ),
  937.     CLCTL_GET_CHARACTERISTICS               = CLCTL_EXTERNAL_CODE( 1, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  938.     CLCTL_GET_FLAGS                         = CLCTL_EXTERNAL_CODE( 2, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  939.     CLCTL_GET_CLASS_INFO                    = CLCTL_EXTERNAL_CODE( 3, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  940.     CLCTL_GET_REQUIRED_DEPENDENCIES         = CLCTL_EXTERNAL_CODE( 4, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  941.     CLCTL_GET_NAME                          = CLCTL_EXTERNAL_CODE( 10, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  942.     CLCTL_GET_RESOURCE_TYPE                 = CLCTL_EXTERNAL_CODE( 11, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  943.     CLCTL_GET_NODE                          = CLCTL_EXTERNAL_CODE( 12, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  944.     CLCTL_GET_NETWORK                       = CLCTL_EXTERNAL_CODE( 13, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  945.     CLCTL_GET_ID                            = CLCTL_EXTERNAL_CODE( 14, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  946.     CLCTL_GET_FQDN                          = CLCTL_EXTERNAL_CODE( 15, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  947.     CLCTL_ENUM_COMMON_PROPERTIES            = CLCTL_EXTERNAL_CODE( 20, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  948.     CLCTL_GET_RO_COMMON_PROPERTIES          = CLCTL_EXTERNAL_CODE( 21, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  949.     CLCTL_GET_COMMON_PROPERTIES             = CLCTL_EXTERNAL_CODE( 22, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  950.     CLCTL_SET_COMMON_PROPERTIES             = CLCTL_EXTERNAL_CODE( 23, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  951.     CLCTL_VALIDATE_COMMON_PROPERTIES        = CLCTL_EXTERNAL_CODE( 24, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  952.     CLCTL_GET_COMMON_PROPERTY_FMTS          = CLCTL_EXTERNAL_CODE( 25, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  953.     CLCTL_GET_COMMON_RESOURCE_PROPERTY_FMTS = CLCTL_EXTERNAL_CODE( 26, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  954.     CLCTL_ENUM_PRIVATE_PROPERTIES           = CLCTL_EXTERNAL_CODE( 30, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  955.     CLCTL_GET_RO_PRIVATE_PROPERTIES         = CLCTL_EXTERNAL_CODE( 31, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  956.     CLCTL_GET_PRIVATE_PROPERTIES            = CLCTL_EXTERNAL_CODE( 32, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  957.     CLCTL_SET_PRIVATE_PROPERTIES            = CLCTL_EXTERNAL_CODE( 33, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  958.     CLCTL_VALIDATE_PRIVATE_PROPERTIES       = CLCTL_EXTERNAL_CODE( 34, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  959.     CLCTL_GET_PRIVATE_PROPERTY_FMTS         = CLCTL_EXTERNAL_CODE( 35, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  960.     CLCTL_GET_PRIVATE_RESOURCE_PROPERTY_FMTS= CLCTL_EXTERNAL_CODE( 36, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  961.     CLCTL_ADD_REGISTRY_CHECKPOINT           = CLCTL_EXTERNAL_CODE( 40, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  962.     CLCTL_DELETE_REGISTRY_CHECKPOINT        = CLCTL_EXTERNAL_CODE( 41, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  963.     CLCTL_GET_REGISTRY_CHECKPOINTS          = CLCTL_EXTERNAL_CODE( 42, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  964.     CLCTL_ADD_CRYPTO_CHECKPOINT             = CLCTL_EXTERNAL_CODE( 43, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  965.     CLCTL_DELETE_CRYPTO_CHECKPOINT          = CLCTL_EXTERNAL_CODE( 44, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  966.     CLCTL_GET_CRYPTO_CHECKPOINTS            = CLCTL_EXTERNAL_CODE( 45, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  967.     CLCTL_RESOURCE_UPGRADE_DLL              = CLCTL_EXTERNAL_CODE( 46, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  968.     CLCTL_GET_LOADBAL_PROCESS_LIST          = CLCTL_EXTERNAL_CODE( 50, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  969.     CLCTL_GET_NETWORK_NAME                  = CLCTL_EXTERNAL_CODE( 90, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  970.     CLCTL_STORAGE_GET_DISK_INFO             = CLCTL_EXTERNAL_CODE( 100, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  971.     CLCTL_STORAGE_GET_AVAILABLE_DISKS       = CLCTL_EXTERNAL_CODE( 101, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  972.     CLCTL_STORAGE_IS_PATH_VALID             = CLCTL_EXTERNAL_CODE( 102, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  973.     CLCTL_STORAGE_GET_ALL_AVAILABLE_DISKS   = (CLCTL_EXTERNAL_CODE( 103, CLUS_ACCESS_READ, CLUS_NO_MODIFY ) | CLCTL_GLOBAL_MASK),
  974.     CLCTL_QUERY_DELETE                      = CLCTL_EXTERNAL_CODE( 110, CLUS_ACCESS_READ, CLUS_NO_MODIFY ),
  975.     //
  976.     // Internal control codes
  977.     //
  978.     CLCTL_DELETE                            = CLCTL_INTERNAL_CODE( 1, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  979.     CLCTL_INSTALL_NODE                      = CLCTL_INTERNAL_CODE( 2, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  980.     CLCTL_EVICT_NODE                        = CLCTL_INTERNAL_CODE( 3, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  981.     CLCTL_ADD_DEPENDENCY                    = CLCTL_INTERNAL_CODE( 4, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  982.     CLCTL_REMOVE_DEPENDENCY                 = CLCTL_INTERNAL_CODE( 5, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  983.     CLCTL_ADD_OWNER                         = CLCTL_INTERNAL_CODE( 6, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  984.     CLCTL_REMOVE_OWNER                      = CLCTL_INTERNAL_CODE( 7, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  985.     //************ Hole here at 8
  986.     CLCTL_SET_NAME                          = CLCTL_INTERNAL_CODE( 9, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  987.     CLCTL_CLUSTER_NAME_CHANGED              = CLCTL_INTERNAL_CODE( 10, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  988.     CLCTL_CLUSTER_VERSION_CHANGED           = CLCTL_INTERNAL_CODE( 11, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  989.     CLCTL_FIXUP_ON_UPGRADE                  = CLCTL_INTERNAL_CODE( 12, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  990.     CLCTL_STARTING_PHASE1                   = CLCTL_INTERNAL_CODE( 13, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  991.     CLCTL_STARTING_PHASE2                   = CLCTL_INTERNAL_CODE( 14, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  992.     CLCTL_HOLD_IO                           = CLCTL_INTERNAL_CODE( 15, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  993.     CLCTL_RESUME_IO                         = CLCTL_INTERNAL_CODE( 16, CLUS_ACCESS_WRITE, CLUS_MODIFY ),
  994.     CLCTL_FORCE_QUORUM                      = CLCTL_INTERNAL_CODE( 17, CLUS_ACCESS_WRITE, CLUS_MODIFY )
  995. } CLCTL_CODES;
  996. #endif // _CLUSTER_API_TYPES_
  997. //
  998. // Define macros to generate object specific control codes
  999. //
  1000. #define CLUSCTL_RESOURCE_CODE( Function ) ( 
  1001.     ((CLUS_OBJECT_RESOURCE << CLUSCTL_OBJECT_SHIFT) | Function) )
  1002. #define CLUSCTL_RESOURCE_TYPE_CODE( Function ) ( 
  1003.     ((CLUS_OBJECT_RESOURCE_TYPE << CLUSCTL_OBJECT_SHIFT) | Function) )
  1004. #define CLUSCTL_GROUP_CODE( Function ) ( 
  1005.     ((CLUS_OBJECT_GROUP << CLUSCTL_OBJECT_SHIFT) | Function) )
  1006. #define CLUSCTL_NODE_CODE( Function ) ( 
  1007.     ((CLUS_OBJECT_NODE << CLUSCTL_OBJECT_SHIFT) | Function) )
  1008. #define CLUSCTL_NETWORK_CODE( Function ) ( 
  1009.     ((CLUS_OBJECT_NETWORK << CLUSCTL_OBJECT_SHIFT) | Function) )
  1010. #define CLUSCTL_NETINTERFACE_CODE( Function ) ( 
  1011.     ((CLUS_OBJECT_NETINTERFACE << CLUSCTL_OBJECT_SHIFT) | Function) )
  1012. #define CLUSCTL_CLUSTER_CODE( Function ) ( 
  1013.     ((CLUS_OBJECT_CLUSTER << CLUSCTL_OBJECT_SHIFT) | Function) )
  1014. #define CLUSCTL_USER_CODE( Function, Object ) ( 
  1015.      ((Object) << CLUSCTL_OBJECT_SHIFT) | ((CLCTL_USER_BASE + Function) << CLUSCTL_FUNCTION_SHIFT) )
  1016. //
  1017. // Define macros to get the function or access mode out of a control code
  1018. //
  1019. #define CLUSCTL_GET_CONTROL_FUNCTION( ControlCode ) 
  1020.     ((ControlCode >> CLUSCTL_ACCESS_SHIFT) & CLUSCTL_CONTROL_CODE_MASK)
  1021. #define CLUSCTL_GET_ACCESS_MODE( ControlCode ) 
  1022.     ((ControlCode >> CLUSCTL_ACCESS_SHIFT) & CLUSCTL_ACCESS_MODE_MASK)
  1023. #define CLUSCTL_GET_CONTROL_OBJECT( ControlCode ) 
  1024.     ((ControlCode >> CLUSCTL_OBJECT_SHIFT) & CLUSCTL_OBJECT_MASK)
  1025. #ifndef _CLUSTER_API_TYPES_
  1026. //
  1027. // Cluster Control Codes for Resources
  1028. //
  1029. typedef enum CLUSCTL_RESOURCE_CODES {
  1030.     // External
  1031.     CLUSCTL_RESOURCE_UNKNOWN =
  1032.         CLUSCTL_RESOURCE_CODE( CLCTL_UNKNOWN ),
  1033.     CLUSCTL_RESOURCE_GET_CHARACTERISTICS =
  1034.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_CHARACTERISTICS ),
  1035.     CLUSCTL_RESOURCE_GET_FLAGS =
  1036.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_FLAGS ),
  1037.     CLUSCTL_RESOURCE_GET_CLASS_INFO =
  1038.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_CLASS_INFO ),
  1039.     CLUSCTL_RESOURCE_GET_REQUIRED_DEPENDENCIES =
  1040.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_REQUIRED_DEPENDENCIES ),
  1041.     CLUSCTL_RESOURCE_GET_NAME =
  1042.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_NAME ),
  1043.     CLUSCTL_RESOURCE_GET_ID =
  1044.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_ID ),
  1045.     CLUSCTL_RESOURCE_GET_RESOURCE_TYPE =
  1046.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_RESOURCE_TYPE ),
  1047.     CLUSCTL_RESOURCE_ENUM_COMMON_PROPERTIES =
  1048.         CLUSCTL_RESOURCE_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1049.     CLUSCTL_RESOURCE_GET_RO_COMMON_PROPERTIES =
  1050.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1051.     CLUSCTL_RESOURCE_GET_COMMON_PROPERTIES =
  1052.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1053.     CLUSCTL_RESOURCE_SET_COMMON_PROPERTIES =
  1054.         CLUSCTL_RESOURCE_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1055.     CLUSCTL_RESOURCE_VALIDATE_COMMON_PROPERTIES =
  1056.         CLUSCTL_RESOURCE_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1057.     CLUSCTL_RESOURCE_GET_COMMON_PROPERTY_FMTS =
  1058.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1059.     CLUSCTL_RESOURCE_ENUM_PRIVATE_PROPERTIES =
  1060.         CLUSCTL_RESOURCE_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1061.     CLUSCTL_RESOURCE_GET_RO_PRIVATE_PROPERTIES =
  1062.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1063.     CLUSCTL_RESOURCE_GET_PRIVATE_PROPERTIES =
  1064.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1065.     CLUSCTL_RESOURCE_SET_PRIVATE_PROPERTIES =
  1066.         CLUSCTL_RESOURCE_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1067.     CLUSCTL_RESOURCE_VALIDATE_PRIVATE_PROPERTIES =
  1068.         CLUSCTL_RESOURCE_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1069.     CLUSCTL_RESOURCE_GET_PRIVATE_PROPERTY_FMTS =
  1070.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS ),
  1071.     CLUSCTL_RESOURCE_ADD_REGISTRY_CHECKPOINT =
  1072.         CLUSCTL_RESOURCE_CODE( CLCTL_ADD_REGISTRY_CHECKPOINT ),
  1073.     CLUSCTL_RESOURCE_DELETE_REGISTRY_CHECKPOINT =
  1074.         CLUSCTL_RESOURCE_CODE( CLCTL_DELETE_REGISTRY_CHECKPOINT ),
  1075.     CLUSCTL_RESOURCE_GET_REGISTRY_CHECKPOINTS =
  1076.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_REGISTRY_CHECKPOINTS ),
  1077.     CLUSCTL_RESOURCE_ADD_CRYPTO_CHECKPOINT =
  1078.         CLUSCTL_RESOURCE_CODE( CLCTL_ADD_CRYPTO_CHECKPOINT ),
  1079.     CLUSCTL_RESOURCE_DELETE_CRYPTO_CHECKPOINT =
  1080.         CLUSCTL_RESOURCE_CODE( CLCTL_DELETE_CRYPTO_CHECKPOINT ),
  1081.     CLUSCTL_RESOURCE_GET_CRYPTO_CHECKPOINTS =
  1082.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_CRYPTO_CHECKPOINTS ),
  1083.     CLUSCTL_RESOURCE_GET_LOADBAL_PROCESS_LIST =
  1084.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_LOADBAL_PROCESS_LIST ),
  1085.     CLUSCTL_RESOURCE_GET_NETWORK_NAME =
  1086.         CLUSCTL_RESOURCE_CODE( CLCTL_GET_NETWORK_NAME ),
  1087.     CLUSCTL_RESOURCE_STORAGE_GET_DISK_INFO =
  1088.         CLUSCTL_RESOURCE_CODE( CLCTL_STORAGE_GET_DISK_INFO ),
  1089.     CLUSCTL_RESOURCE_STORAGE_IS_PATH_VALID =
  1090.         CLUSCTL_RESOURCE_CODE( CLCTL_STORAGE_IS_PATH_VALID ),
  1091.     CLUSCTL_RESOURCE_QUERY_DELETE =
  1092.         CLUSCTL_RESOURCE_CODE( CLCTL_QUERY_DELETE ),
  1093.     CLUSCTL_RESOURCE_UPGRADE_DLL =
  1094.         CLUSCTL_RESOURCE_CODE( CLCTL_RESOURCE_UPGRADE_DLL ),
  1095.     // Internal
  1096.     CLUSCTL_RESOURCE_DELETE =
  1097.         CLUSCTL_RESOURCE_CODE( CLCTL_DELETE ),
  1098.     CLUSCTL_RESOURCE_INSTALL_NODE =
  1099.         CLUSCTL_RESOURCE_CODE( CLCTL_INSTALL_NODE ),
  1100.     CLUSCTL_RESOURCE_EVICT_NODE =
  1101.         CLUSCTL_RESOURCE_CODE( CLCTL_EVICT_NODE ),
  1102.     CLUSCTL_RESOURCE_ADD_DEPENDENCY =
  1103.         CLUSCTL_RESOURCE_CODE( CLCTL_ADD_DEPENDENCY ),
  1104.     CLUSCTL_RESOURCE_REMOVE_DEPENDENCY =
  1105.         CLUSCTL_RESOURCE_CODE( CLCTL_REMOVE_DEPENDENCY ),
  1106.     CLUSCTL_RESOURCE_ADD_OWNER =
  1107.         CLUSCTL_RESOURCE_CODE( CLCTL_ADD_OWNER ),
  1108.     CLUSCTL_RESOURCE_REMOVE_OWNER =
  1109.         CLUSCTL_RESOURCE_CODE( CLCTL_REMOVE_OWNER ),
  1110.     CLUSCTL_RESOURCE_SET_NAME =
  1111.         CLUSCTL_RESOURCE_CODE( CLCTL_SET_NAME ),
  1112.     CLUSCTL_RESOURCE_CLUSTER_NAME_CHANGED =
  1113.         CLUSCTL_RESOURCE_CODE( CLCTL_CLUSTER_NAME_CHANGED ),
  1114.     CLUSCTL_RESOURCE_CLUSTER_VERSION_CHANGED =
  1115.         CLUSCTL_RESOURCE_CODE( CLCTL_CLUSTER_VERSION_CHANGED ),
  1116.     CLUSCTL_RESOURCE_FORCE_QUORUM =
  1117.         CLUSCTL_RESOURCE_CODE( CLCTL_FORCE_QUORUM )
  1118. } CLUSCTL_RESOURCE_CODES;
  1119. //
  1120. // Cluster Control Codes for Resource Types
  1121. //
  1122. typedef enum CLUSCTL_RESOURCE_TYPE_CODES {
  1123.     // External
  1124.     CLUSCTL_RESOURCE_TYPE_UNKNOWN =
  1125.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_UNKNOWN ),
  1126.     CLUSCTL_RESOURCE_TYPE_GET_CHARACTERISTICS  =
  1127.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_CHARACTERISTICS ),
  1128.     CLUSCTL_RESOURCE_TYPE_GET_FLAGS =
  1129.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_FLAGS ),
  1130.     CLUSCTL_RESOURCE_TYPE_GET_CLASS_INFO =
  1131.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_CLASS_INFO ),
  1132.     CLUSCTL_RESOURCE_TYPE_GET_REQUIRED_DEPENDENCIES =
  1133.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_REQUIRED_DEPENDENCIES ),
  1134.     CLUSCTL_RESOURCE_TYPE_ENUM_COMMON_PROPERTIES =
  1135.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1136.     CLUSCTL_RESOURCE_TYPE_GET_RO_COMMON_PROPERTIES =
  1137.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1138.     CLUSCTL_RESOURCE_TYPE_GET_COMMON_PROPERTIES =
  1139.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1140.     CLUSCTL_RESOURCE_TYPE_VALIDATE_COMMON_PROPERTIES =
  1141.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1142.     CLUSCTL_RESOURCE_TYPE_SET_COMMON_PROPERTIES =
  1143.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1144.     CLUSCTL_RESOURCE_TYPE_GET_COMMON_PROPERTY_FMTS =
  1145.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1146.     CLUSCTL_RESOURCE_TYPE_GET_COMMON_RESOURCE_PROPERTY_FMTS =
  1147.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_COMMON_RESOURCE_PROPERTY_FMTS ),
  1148.     CLUSCTL_RESOURCE_TYPE_ENUM_PRIVATE_PROPERTIES =
  1149.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1150.     CLUSCTL_RESOURCE_TYPE_GET_RO_PRIVATE_PROPERTIES =
  1151.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1152.     CLUSCTL_RESOURCE_TYPE_GET_PRIVATE_PROPERTIES =
  1153.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1154.     CLUSCTL_RESOURCE_TYPE_SET_PRIVATE_PROPERTIES =
  1155.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1156.     CLUSCTL_RESOURCE_TYPE_VALIDATE_PRIVATE_PROPERTIES =
  1157.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1158.     CLUSCTL_RESOURCE_TYPE_GET_PRIVATE_PROPERTY_FMTS =
  1159.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS ),
  1160.     CLUSCTL_RESOURCE_TYPE_GET_PRIVATE_RESOURCE_PROPERTY_FMTS =
  1161.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_PRIVATE_RESOURCE_PROPERTY_FMTS ),
  1162.     CLUSCTL_RESOURCE_TYPE_GET_REGISTRY_CHECKPOINTS =
  1163.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_REGISTRY_CHECKPOINTS ),
  1164.     CLUSCTL_RESOURCE_TYPE_GET_CRYPTO_CHECKPOINTS =
  1165.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_GET_CRYPTO_CHECKPOINTS ),
  1166.     CLUSCTL_RESOURCE_TYPE_STORAGE_GET_AVAILABLE_DISKS =
  1167.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_STORAGE_GET_AVAILABLE_DISKS ),
  1168.     CLUSCTL_RESOURCE_TYPE_QUERY_DELETE =
  1169.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_QUERY_DELETE ),
  1170.     // Internal
  1171.     CLUSCTL_RESOURCE_TYPE_INSTALL_NODE =
  1172.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_INSTALL_NODE ),
  1173.     CLUSCTL_RESOURCE_TYPE_EVICT_NODE =
  1174.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_EVICT_NODE ),
  1175.     CLUSCTL_RESOURCE_TYPE_CLUSTER_VERSION_CHANGED =
  1176.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_CLUSTER_VERSION_CHANGED ),
  1177.     CLUSCTL_RESOURCE_TYPE_FIXUP_ON_UPGRADE =
  1178.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_FIXUP_ON_UPGRADE ),
  1179.     CLUSCTL_RESOURCE_TYPE_STARTING_PHASE1 =
  1180.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_STARTING_PHASE1 ),
  1181.     CLUSCTL_RESOURCE_TYPE_STARTING_PHASE2 =
  1182.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_STARTING_PHASE2 ),
  1183.     CLUSCTL_RESOURCE_TYPE_HOLD_IO =
  1184.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_HOLD_IO ),
  1185.     CLUSCTL_RESOURCE_TYPE_RESUME_IO =
  1186.         CLUSCTL_RESOURCE_TYPE_CODE( CLCTL_RESUME_IO )
  1187. } CLUSCTL_RESOURCE_TYPE_CODES;
  1188. //
  1189. // Cluster Control Codes for Groups
  1190. //
  1191. typedef enum CLUSCTL_GROUP_CODES {
  1192.     // External
  1193.     CLUSCTL_GROUP_UNKNOWN =
  1194.         CLUSCTL_GROUP_CODE( CLCTL_UNKNOWN ),
  1195.     CLUSCTL_GROUP_GET_CHARACTERISTICS =
  1196.         CLUSCTL_GROUP_CODE( CLCTL_GET_CHARACTERISTICS ),
  1197.     CLUSCTL_GROUP_GET_FLAGS =
  1198.         CLUSCTL_GROUP_CODE( CLCTL_GET_FLAGS ),
  1199.     CLUSCTL_GROUP_GET_NAME =
  1200.         CLUSCTL_GROUP_CODE( CLCTL_GET_NAME ),
  1201.     CLUSCTL_GROUP_GET_ID =
  1202.         CLUSCTL_GROUP_CODE( CLCTL_GET_ID ),
  1203.     CLUSCTL_GROUP_ENUM_COMMON_PROPERTIES =
  1204.         CLUSCTL_GROUP_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1205.     CLUSCTL_GROUP_GET_RO_COMMON_PROPERTIES =
  1206.         CLUSCTL_GROUP_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1207.     CLUSCTL_GROUP_GET_COMMON_PROPERTIES =
  1208.         CLUSCTL_GROUP_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1209.     CLUSCTL_GROUP_SET_COMMON_PROPERTIES =
  1210.         CLUSCTL_GROUP_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1211.     CLUSCTL_GROUP_VALIDATE_COMMON_PROPERTIES =
  1212.         CLUSCTL_GROUP_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1213.     CLUSCTL_GROUP_ENUM_PRIVATE_PROPERTIES =
  1214.         CLUSCTL_GROUP_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1215.     CLUSCTL_GROUP_GET_RO_PRIVATE_PROPERTIES =
  1216.         CLUSCTL_GROUP_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1217.     CLUSCTL_GROUP_GET_PRIVATE_PROPERTIES =
  1218.         CLUSCTL_GROUP_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1219.     CLUSCTL_GROUP_SET_PRIVATE_PROPERTIES =
  1220.         CLUSCTL_GROUP_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1221.     CLUSCTL_GROUP_VALIDATE_PRIVATE_PROPERTIES =
  1222.         CLUSCTL_GROUP_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1223.     CLUSCTL_GROUP_QUERY_DELETE =
  1224.         CLUSCTL_GROUP_CODE( CLCTL_QUERY_DELETE ),
  1225.     CLUSCTL_GROUP_GET_COMMON_PROPERTY_FMTS=
  1226.         CLUSCTL_GROUP_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1227.     CLUSCTL_GROUP_GET_PRIVATE_PROPERTY_FMTS=
  1228.         CLUSCTL_GROUP_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS )
  1229.     // Internal
  1230. } CLUSCTL_GROUP_CODES;
  1231. //
  1232. // Cluster Control Codes for Nodes
  1233. //
  1234. typedef enum CLUSCTL_NODE_CODES {
  1235.     // External
  1236.     CLUSCTL_NODE_UNKNOWN =
  1237.         CLUSCTL_NODE_CODE( CLCTL_UNKNOWN ),
  1238.     CLUSCTL_NODE_GET_CHARACTERISTICS =
  1239.         CLUSCTL_NODE_CODE( CLCTL_GET_CHARACTERISTICS ),
  1240.     CLUSCTL_NODE_GET_FLAGS =
  1241.         CLUSCTL_NODE_CODE( CLCTL_GET_FLAGS ),
  1242.     CLUSCTL_NODE_GET_NAME =
  1243.         CLUSCTL_NODE_CODE( CLCTL_GET_NAME ),
  1244.     CLUSCTL_NODE_GET_ID =
  1245.         CLUSCTL_NODE_CODE( CLCTL_GET_ID ),
  1246.     CLUSCTL_NODE_ENUM_COMMON_PROPERTIES =
  1247.         CLUSCTL_NODE_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1248.     CLUSCTL_NODE_GET_RO_COMMON_PROPERTIES =
  1249.         CLUSCTL_NODE_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1250.     CLUSCTL_NODE_GET_COMMON_PROPERTIES =
  1251.         CLUSCTL_NODE_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1252.     CLUSCTL_NODE_SET_COMMON_PROPERTIES =
  1253.         CLUSCTL_NODE_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1254.     CLUSCTL_NODE_VALIDATE_COMMON_PROPERTIES =
  1255.         CLUSCTL_NODE_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1256.     CLUSCTL_NODE_ENUM_PRIVATE_PROPERTIES =
  1257.         CLUSCTL_NODE_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1258.     CLUSCTL_NODE_GET_RO_PRIVATE_PROPERTIES =
  1259.         CLUSCTL_NODE_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1260.     CLUSCTL_NODE_GET_PRIVATE_PROPERTIES =
  1261.         CLUSCTL_NODE_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1262.     CLUSCTL_NODE_SET_PRIVATE_PROPERTIES =
  1263.         CLUSCTL_NODE_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1264.     CLUSCTL_NODE_VALIDATE_PRIVATE_PROPERTIES =
  1265.         CLUSCTL_NODE_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1266.     CLUSCTL_NODE_GET_COMMON_PROPERTY_FMTS=
  1267.         CLUSCTL_NODE_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1268.     CLUSCTL_NODE_GET_PRIVATE_PROPERTY_FMTS=
  1269.         CLUSCTL_NODE_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS )
  1270. } CLUSCTL_NODE_CODES;
  1271. //
  1272. // Cluster Control Codes for Networks
  1273. //
  1274. typedef enum CLUSCTL_NETWORK_CODES {
  1275.     // External
  1276.     CLUSCTL_NETWORK_UNKNOWN =
  1277.         CLUSCTL_NETWORK_CODE( CLCTL_UNKNOWN ),
  1278.     CLUSCTL_NETWORK_GET_CHARACTERISTICS =
  1279.         CLUSCTL_NETWORK_CODE( CLCTL_GET_CHARACTERISTICS ),
  1280.     CLUSCTL_NETWORK_GET_FLAGS =
  1281.         CLUSCTL_NETWORK_CODE( CLCTL_GET_FLAGS ),
  1282.     CLUSCTL_NETWORK_GET_NAME =
  1283.         CLUSCTL_NETWORK_CODE( CLCTL_GET_NAME ),
  1284.     CLUSCTL_NETWORK_GET_ID =
  1285.         CLUSCTL_NETWORK_CODE( CLCTL_GET_ID ),
  1286.     CLUSCTL_NETWORK_ENUM_COMMON_PROPERTIES =
  1287.         CLUSCTL_NETWORK_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1288.     CLUSCTL_NETWORK_GET_RO_COMMON_PROPERTIES =
  1289.         CLUSCTL_NETWORK_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1290.     CLUSCTL_NETWORK_GET_COMMON_PROPERTIES =
  1291.         CLUSCTL_NETWORK_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1292.     CLUSCTL_NETWORK_SET_COMMON_PROPERTIES =
  1293.         CLUSCTL_NETWORK_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1294.     CLUSCTL_NETWORK_VALIDATE_COMMON_PROPERTIES =
  1295.         CLUSCTL_NETWORK_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1296.     CLUSCTL_NETWORK_ENUM_PRIVATE_PROPERTIES =
  1297.         CLUSCTL_NETWORK_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1298.     CLUSCTL_NETWORK_GET_RO_PRIVATE_PROPERTIES =
  1299.         CLUSCTL_NETWORK_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1300.     CLUSCTL_NETWORK_GET_PRIVATE_PROPERTIES =
  1301.         CLUSCTL_NETWORK_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1302.     CLUSCTL_NETWORK_SET_PRIVATE_PROPERTIES =
  1303.         CLUSCTL_NETWORK_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1304.     CLUSCTL_NETWORK_VALIDATE_PRIVATE_PROPERTIES =
  1305.         CLUSCTL_NETWORK_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1306.     CLUSCTL_NETWORK_GET_COMMON_PROPERTY_FMTS=
  1307.         CLUSCTL_NETWORK_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1308.     CLUSCTL_NETWORK_GET_PRIVATE_PROPERTY_FMTS=
  1309.         CLUSCTL_NETWORK_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS )
  1310. } CLUSCTL_NETWORK_CODES;
  1311. //
  1312. // Cluster Control Codes for Network Interfaces
  1313. //
  1314. typedef enum CLUSCTL_NETINTERFACE_CODES {
  1315.     // External
  1316.     CLUSCTL_NETINTERFACE_UNKNOWN =
  1317.         CLUSCTL_NETINTERFACE_CODE( CLCTL_UNKNOWN ),
  1318.     CLUSCTL_NETINTERFACE_GET_CHARACTERISTICS =
  1319.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_CHARACTERISTICS ),
  1320.     CLUSCTL_NETINTERFACE_GET_FLAGS =
  1321.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_FLAGS ),
  1322.     CLUSCTL_NETINTERFACE_GET_NAME =
  1323.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_NAME ),
  1324.     CLUSCTL_NETINTERFACE_GET_ID =
  1325.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_ID ),
  1326.     CLUSCTL_NETINTERFACE_GET_NODE =
  1327.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_NODE ),
  1328.     CLUSCTL_NETINTERFACE_GET_NETWORK =
  1329.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_NETWORK ),
  1330.     CLUSCTL_NETINTERFACE_ENUM_COMMON_PROPERTIES =
  1331.         CLUSCTL_NETINTERFACE_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1332.     CLUSCTL_NETINTERFACE_GET_RO_COMMON_PROPERTIES =
  1333.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1334.     CLUSCTL_NETINTERFACE_GET_COMMON_PROPERTIES =
  1335.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1336.     CLUSCTL_NETINTERFACE_SET_COMMON_PROPERTIES =
  1337.         CLUSCTL_NETINTERFACE_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1338.     CLUSCTL_NETINTERFACE_VALIDATE_COMMON_PROPERTIES =
  1339.         CLUSCTL_NETINTERFACE_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1340.     CLUSCTL_NETINTERFACE_ENUM_PRIVATE_PROPERTIES =
  1341.         CLUSCTL_NETINTERFACE_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1342.     CLUSCTL_NETINTERFACE_GET_RO_PRIVATE_PROPERTIES =
  1343.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1344.     CLUSCTL_NETINTERFACE_GET_PRIVATE_PROPERTIES =
  1345.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1346.     CLUSCTL_NETINTERFACE_SET_PRIVATE_PROPERTIES =
  1347.         CLUSCTL_NETINTERFACE_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1348.     CLUSCTL_NETINTERFACE_VALIDATE_PRIVATE_PROPERTIES =
  1349.         CLUSCTL_NETINTERFACE_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1350.     CLUSCTL_NETINTERFACE_GET_COMMON_PROPERTY_FMTS=
  1351.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1352.     CLUSCTL_NETINTERFACE_GET_PRIVATE_PROPERTY_FMTS=
  1353.         CLUSCTL_NETINTERFACE_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS )
  1354. } CLUSCTL_NETINTERFACE_CODES;
  1355. //
  1356. // Cluster Control Codes for Nodes
  1357. //
  1358. typedef enum CLUSCTL_CLUSTER_CODES {
  1359.     // External
  1360.     CLUSCTL_CLUSTER_UNKNOWN =
  1361.         CLUSCTL_CLUSTER_CODE( CLCTL_UNKNOWN ),
  1362.     CLUSCTL_CLUSTER_GET_FQDN =
  1363.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_FQDN ),
  1364.     CLUSCTL_CLUSTER_ENUM_COMMON_PROPERTIES =
  1365.         CLUSCTL_CLUSTER_CODE( CLCTL_ENUM_COMMON_PROPERTIES ),
  1366.     CLUSCTL_CLUSTER_GET_RO_COMMON_PROPERTIES =
  1367.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_RO_COMMON_PROPERTIES ),
  1368.     CLUSCTL_CLUSTER_GET_COMMON_PROPERTIES =
  1369.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_COMMON_PROPERTIES ),
  1370.     CLUSCTL_CLUSTER_SET_COMMON_PROPERTIES =
  1371.         CLUSCTL_CLUSTER_CODE( CLCTL_SET_COMMON_PROPERTIES ),
  1372.     CLUSCTL_CLUSTER_VALIDATE_COMMON_PROPERTIES =
  1373.         CLUSCTL_CLUSTER_CODE( CLCTL_VALIDATE_COMMON_PROPERTIES ),
  1374.     CLUSCTL_CLUSTER_ENUM_PRIVATE_PROPERTIES =
  1375.         CLUSCTL_CLUSTER_CODE( CLCTL_ENUM_PRIVATE_PROPERTIES ),
  1376.     CLUSCTL_CLUSTER_GET_RO_PRIVATE_PROPERTIES =
  1377.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_RO_PRIVATE_PROPERTIES ),
  1378.     CLUSCTL_CLUSTER_GET_PRIVATE_PROPERTIES =
  1379.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_PRIVATE_PROPERTIES ),
  1380.     CLUSCTL_CLUSTER_SET_PRIVATE_PROPERTIES =
  1381.         CLUSCTL_CLUSTER_CODE( CLCTL_SET_PRIVATE_PROPERTIES ),
  1382.     CLUSCTL_CLUSTER_VALIDATE_PRIVATE_PROPERTIES =
  1383.         CLUSCTL_CLUSTER_CODE( CLCTL_VALIDATE_PRIVATE_PROPERTIES ),
  1384.     CLUSCTL_CLUSTER_GET_COMMON_PROPERTY_FMTS=
  1385.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_COMMON_PROPERTY_FMTS ),
  1386.     CLUSCTL_CLUSTER_GET_PRIVATE_PROPERTY_FMTS=
  1387.         CLUSCTL_CLUSTER_CODE( CLCTL_GET_PRIVATE_PROPERTY_FMTS )
  1388. } CLUSCTL_CLUSTER_CODES;
  1389. //
  1390. // Cluster Resource Class types
  1391. //
  1392. typedef enum CLUSTER_RESOURCE_CLASS {
  1393.     CLUS_RESCLASS_UNKNOWN = 0,
  1394.     CLUS_RESCLASS_STORAGE,
  1395.     CLUS_RESCLASS_USER = 32768
  1396. } CLUSTER_RESOURCE_CLASS;
  1397. //
  1398. // Define Resource SubClass bits
  1399. //
  1400. typedef enum CLUS_RESSUBCLASS {
  1401.     CLUS_RESSUBCLASS_SHARED = 0x80000000
  1402. } CLUS_RESSUBCLASS;
  1403. //
  1404. // Cluster Characteristics
  1405. //
  1406. typedef enum CLUS_CHARACTERISTICS {
  1407.     CLUS_CHAR_UNKNOWN                   = 0x00000000,
  1408.     CLUS_CHAR_QUORUM                    = 0x00000001,
  1409.     CLUS_CHAR_DELETE_REQUIRES_ALL_NODES = 0x00000002,
  1410.     CLUS_CHAR_LOCAL_QUORUM              = 0x00000004,
  1411.     CLUS_CHAR_LOCAL_QUORUM_DEBUG        = 0x00000008
  1412. } CLUS_CHARACTERISTICS;
  1413. //
  1414. // Cluster Flags
  1415. //
  1416. typedef enum CLUS_FLAGS {
  1417.     CLUS_FLAG_CORE          = 0x00000001
  1418. }  CLUS_FLAGS;
  1419. //
  1420. // Cluster Resource Property Helper Structures
  1421. //
  1422. #ifndef MIDL_PASS
  1423. // Property syntax.  Used for property names and values.
  1424. typedef union CLUSPROP_SYNTAX {
  1425.     DWORD dw;
  1426.     struct {
  1427.         WORD wFormat;
  1428.         WORD wType;
  1429.     };
  1430. } CLUSPROP_SYNTAX, *PCLUSPROP_SYNTAX;
  1431. // Property value.
  1432. typedef struct CLUSPROP_VALUE {
  1433.     CLUSPROP_SYNTAX Syntax;
  1434.     DWORD           cbLength;
  1435. } CLUSPROP_VALUE, *PCLUSPROP_VALUE;
  1436. // Binary property value.
  1437. #ifdef __cplusplus
  1438. typedef struct CLUSPROP_BINARY : public CLUSPROP_VALUE {
  1439. #else
  1440. typedef struct CLUSPROP_BINARY {
  1441.     CLUSPROP_VALUE;
  1442. #endif
  1443.     BYTE            rgb[];
  1444. } CLUSPROP_BINARY, *PCLUSPROP_BINARY;
  1445. // WORD property value.
  1446. #ifdef __cplusplus
  1447. typedef struct CLUSPROP_WORD : public CLUSPROP_VALUE {
  1448. #else
  1449. typedef struct CLUSPROP_WORD {
  1450.     CLUSPROP_VALUE;
  1451. #endif
  1452.     WORD            w;
  1453. } CLUSPROP_WORD, *PCLUSPROP_WORD;
  1454. // DWORD property value.
  1455. #ifdef __cplusplus
  1456. typedef struct CLUSPROP_DWORD : public CLUSPROP_VALUE {
  1457. #else
  1458. typedef struct CLUSPROP_DWORD {
  1459.     CLUSPROP_VALUE;
  1460. #endif
  1461.     DWORD           dw;
  1462. } CLUSPROP_DWORD, *PCLUSPROP_DWORD;
  1463. // LONG property value.
  1464. #ifdef __cplusplus
  1465. typedef struct CLUSPROP_LONG : public CLUSPROP_VALUE {
  1466. #else
  1467. typedef struct CLUSPROP_LONG {
  1468.     CLUSPROP_VALUE;
  1469. #endif
  1470.     LONG           l;
  1471. } CLUSPROP_LONG, *PCLUSPROP_LONG;
  1472. // String property value.
  1473. #ifdef __cplusplus
  1474. typedef struct CLUSPROP_SZ : public CLUSPROP_VALUE {
  1475. #else
  1476. typedef struct CLUSPROP_SZ {
  1477.     CLUSPROP_VALUE;
  1478. #endif
  1479.     WCHAR           sz[];
  1480. } CLUSPROP_SZ, *PCLUSPROP_SZ;
  1481. // Multiple string property value.
  1482. typedef CLUSPROP_SZ CLUSPROP_MULTI_SZ, *PCLUSPROP_MULTI_SZ;
  1483. // Property name.
  1484. typedef CLUSPROP_SZ CLUSPROP_PROPERTY_NAME, *PCLUSPROP_PROPERTY_NAME;
  1485. // Unsigned large Integer property value.
  1486. #ifdef __cplusplus
  1487. typedef struct CLUSPROP_ULARGE_INTEGER
  1488.     : public CLUSPROP_VALUE {
  1489. #else
  1490. typedef struct CLUSPROP_ULARGE_INTEGER {
  1491.     CLUSPROP_VALUE;
  1492. #endif
  1493.     ULARGE_INTEGER li;
  1494. } CLUSPROP_ULARGE_INTEGER, *PCLUSPROP_ULARGE_INTEGER;
  1495. // Signed large Integer property value.
  1496. #ifdef __cplusplus
  1497. typedef struct CLUSPROP_LARGE_INTEGER
  1498.     : public CLUSPROP_VALUE {
  1499. #else
  1500. typedef struct CLUSPROP_LARGE_INTEGER {
  1501.     CLUSPROP_VALUE;
  1502. #endif
  1503.     LARGE_INTEGER li;
  1504. } CLUSPROP_LARGE_INTEGER, *PCLUSPROP_LARGE_INTEGER;
  1505. // Security Descriptor property value.
  1506. #ifdef __cplusplus
  1507. typedef struct CLUSPROP_SECURITY_DESCRIPTOR : public CLUSPROP_VALUE {
  1508. #else
  1509. typedef struct CLUSPROP_SECURITY_DESCRIPTOR {
  1510.     CLUSPROP_VALUE;
  1511. #endif
  1512.     union {
  1513.         SECURITY_DESCRIPTOR_RELATIVE    sd;
  1514.         BYTE                            rgbSecurityDescriptor[];
  1515.     };
  1516. } CLUSPROP_SECURITY_DESCRIPTOR, *PCLUSPROP_SECURITY_DESCRIPTOR;
  1517. // Resource class info returned by CLCTL_GET_CLASS_INFO control functions.
  1518. typedef struct CLUS_RESOURCE_CLASS_INFO {
  1519.     union {
  1520.         struct {
  1521.             union {
  1522.                 DWORD                   dw;
  1523.                 CLUSTER_RESOURCE_CLASS  rc;
  1524.                 };
  1525.             DWORD           SubClass;
  1526.         };
  1527.         ULARGE_INTEGER      li;
  1528.     };
  1529. } CLUS_RESOURCE_CLASS_INFO, *PCLUS_RESOURCE_CLASS_INFO;
  1530. // Resource class property value.
  1531. #ifdef __cplusplus
  1532. typedef struct CLUSPROP_RESOURCE_CLASS
  1533.     : public CLUSPROP_VALUE {
  1534. #else
  1535. typedef struct CLUSPROP_RESOURCE_CLASS {
  1536.     CLUSPROP_VALUE;
  1537. #endif
  1538.     CLUSTER_RESOURCE_CLASS rc;
  1539. } CLUSPROP_RESOURCE_CLASS, *PCLUSPROP_RESOURCE_CLASS;
  1540. // Resource class info property value.
  1541. #ifdef __cplusplus
  1542. typedef struct CLUSPROP_RESOURCE_CLASS_INFO
  1543.     : public CLUSPROP_VALUE
  1544.     , public CLUS_RESOURCE_CLASS_INFO {
  1545. #else
  1546. typedef struct CLUSPROP_RESOURCE_CLASS_INFO {
  1547.     CLUSPROP_VALUE;
  1548.     CLUS_RESOURCE_CLASS_INFO;
  1549. #endif
  1550. } CLUSPROP_RESOURCE_CLASS_INFO, *PCLUSPROP_RESOURCE_CLASS_INFO;
  1551. // One entry from list returned by CLCTL_GET_REQUIRED_DEPENDENCIES control functions.
  1552. typedef union CLUSPROP_REQUIRED_DEPENDENCY {
  1553.     CLUSPROP_VALUE          Value;
  1554.     CLUSPROP_RESOURCE_CLASS ResClass;
  1555.     CLUSPROP_SZ             ResTypeName;
  1556. } CLUSPROP_REQUIRED_DEPENDENCY, *PCLUSPROP_REQUIRED_DEPENDENCY;
  1557. typedef CLUSPROP_DWORD CLUSPROP_DISK_NUMBER, *PCLUSPROP_DISK_NUMBER;
  1558. #endif // MIDL_PASS
  1559. #endif // _CLUSTER_API_TYPES_
  1560. //#ifdef MIDL_PASS
  1561. //#ifndef MAX_PATH
  1562. //#define MAX_PATH 260
  1563. //#endif
  1564. //#endif // if MIDL_PASS
  1565. #ifndef _CLUSTER_API_TYPES_
  1566. // Disk partition information flags.
  1567. typedef enum CLUSPROP_PIFLAGS {
  1568.     CLUSPROP_PIFLAG_STICKY          = 0x00000001,
  1569.     CLUSPROP_PIFLAG_REMOVABLE       = 0x00000002,
  1570.     CLUSPROP_PIFLAG_USABLE          = 0x00000004,
  1571.     CLUSPROP_PIFLAG_DEFAULT_QUORUM  = 0x00000008
  1572. } CLUSPROP_PIFLAGS;
  1573. #ifndef MIDL_PASS
  1574. //force quorum information, useful for QON type resources
  1575. //to be able to continue operation without the quorum
  1576. typedef struct CLUS_FORCE_QUORUM_INFO {
  1577.     DWORD           dwSize; // size of this struct including the nodes list.
  1578.     DWORD           dwNodeBitMask;      // a bit mask representing the max assumed node set
  1579.     DWORD           dwMaxNumberofNodes; // the number of bits set in the mask
  1580.     WCHAR           multiszNodeList[1]; // Multi sz list of nodes
  1581. } CLUS_FORCE_QUORUM_INFO, *PCLUS_FORCE_QUORUM_INFO;
  1582. // Disk partition information.
  1583. typedef struct CLUS_PARTITION_INFO {
  1584.     DWORD           dwFlags;
  1585.     WCHAR           szDeviceName[MAX_PATH];
  1586.     WCHAR           szVolumeLabel[MAX_PATH];
  1587.     DWORD           dwSerialNumber;
  1588.     DWORD           rgdwMaximumComponentLength;
  1589.     DWORD           dwFileSystemFlags;
  1590.     WCHAR           szFileSystem[32];
  1591. } CLUS_PARTITION_INFO, *PCLUS_PARTITION_INFO;
  1592. // Disk partition information property value.
  1593. #ifdef __cplusplus
  1594. typedef struct CLUSPROP_PARTITION_INFO
  1595.     : public CLUSPROP_VALUE
  1596.     , public CLUS_PARTITION_INFO {
  1597. #else
  1598. typedef struct CLUSPROP_PARTITION_INFO {
  1599.     CLUSPROP_VALUE;
  1600.     CLUS_PARTITION_INFO;
  1601. #endif
  1602. } CLUSPROP_PARTITION_INFO, *PCLUSPROP_PARTITION_INFO;
  1603. //
  1604. // FT set information.
  1605. //
  1606. typedef struct CLUS_FTSET_INFO {
  1607.     DWORD           dwRootSignature;
  1608.     DWORD           dwFtType;
  1609. } CLUS_FTSET_INFO, *PCLUS_FTSET_INFO;
  1610. // Disk partition information property value.
  1611. #ifdef __cplusplus
  1612. typedef struct CLUSPROP_FTSET_INFO
  1613.     : public CLUSPROP_VALUE
  1614.     , public CLUS_FTSET_INFO {
  1615. #else
  1616. typedef struct CLUSPROP_FTSET_INFO {
  1617.     CLUSPROP_VALUE;
  1618.     CLUS_FTSET_INFO;
  1619. #endif
  1620. } CLUSPROP_FTSET_INFO, *PCLUSPROP_FTSET_INFO;
  1621. // Disk Signature property value.
  1622. typedef CLUSPROP_DWORD CLUSPROP_DISK_SIGNATURE, *PCLUSPROP_DISK_SIGNATURE;
  1623. // SCSI Address.
  1624. typedef struct CLUS_SCSI_ADDRESS {
  1625.     union {
  1626.         struct {
  1627.             UCHAR PortNumber;
  1628.             UCHAR PathId;
  1629.             UCHAR TargetId;
  1630.             UCHAR Lun;
  1631.         };
  1632.         DWORD   dw;
  1633.     };
  1634. } CLUS_SCSI_ADDRESS, *PCLUS_SCSI_ADDRESS;
  1635. // SCSI Address property value.
  1636. #ifdef __cplusplus
  1637. typedef struct CLUSPROP_SCSI_ADDRESS
  1638.     : public CLUSPROP_VALUE
  1639.     , public CLUS_SCSI_ADDRESS {
  1640. #else
  1641. typedef struct CLUSPROP_SCSI_ADDRESS {
  1642.     CLUSPROP_VALUE;
  1643.     CLUS_SCSI_ADDRESS;
  1644. #endif
  1645. } CLUSPROP_SCSI_ADDRESS, *PCLUSPROP_SCSI_ADDRESS;
  1646. // Beginning of a property list.
  1647. typedef struct CLUSPROP_LIST {
  1648.     DWORD                   nPropertyCount;
  1649.     CLUSPROP_PROPERTY_NAME  PropertyName;
  1650. } CLUSPROP_LIST, *PCLUSPROP_LIST;
  1651. // Helper for building or parsing a property list buffer.
  1652. typedef union CLUSPROP_BUFFER_HELPER {
  1653.     BYTE *                          pb;
  1654.     WORD *                          pw;
  1655.     DWORD *                         pdw;
  1656.     LONG *                          pl;
  1657.     LPWSTR                          psz;
  1658.     PCLUSPROP_LIST                  pList;
  1659.     PCLUSPROP_SYNTAX                pSyntax;
  1660.     PCLUSPROP_PROPERTY_NAME         pName;
  1661.     PCLUSPROP_VALUE                 pValue;
  1662.     PCLUSPROP_BINARY                pBinaryValue;
  1663.     PCLUSPROP_WORD                  pWordValue;
  1664.     PCLUSPROP_DWORD                 pDwordValue;
  1665.     PCLUSPROP_LONG                  pLongValue;
  1666.     PCLUSPROP_ULARGE_INTEGER        pULargeIntegerValue;
  1667.     PCLUSPROP_LARGE_INTEGER         pLargeIntegerValue;
  1668.     PCLUSPROP_SZ                    pStringValue;
  1669.     PCLUSPROP_MULTI_SZ              pMultiSzValue;
  1670.     PCLUSPROP_SECURITY_DESCRIPTOR   pSecurityDescriptor;
  1671.     PCLUSPROP_RESOURCE_CLASS        pResourceClassValue;
  1672.     PCLUSPROP_RESOURCE_CLASS_INFO   pResourceClassInfoValue;
  1673.     PCLUSPROP_DISK_SIGNATURE        pDiskSignatureValue;
  1674.     PCLUSPROP_SCSI_ADDRESS          pScsiAddressValue;
  1675.     PCLUSPROP_DISK_NUMBER           pDiskNumberValue;
  1676.     PCLUSPROP_PARTITION_INFO        pPartitionInfoValue;
  1677.     PCLUSPROP_REQUIRED_DEPENDENCY   pRequiredDependencyValue;
  1678. } CLUSPROP_BUFFER_HELPER, *PCLUSPROP_BUFFER_HELPER;
  1679. #endif // MIDL_PASS
  1680. #endif // _CLUSTER_API_TYPES_
  1681. // Macro for aligning CLUSPROP buffers on a DWORD boundary.
  1682. #define ALIGN_CLUSPROP( count ) ((count + 3) & ~3)
  1683. // Macros for declaring array format values
  1684. #define CLUSPROP_BINARY_DECLARE( name, cb ) 
  1685.     struct {                                
  1686.         CLUSPROP_SYNTAX Syntax;             
  1687.         DWORD           cbLength;           
  1688.         BYTE            rgb[(cb + 3) & ~3]; 
  1689.     } name
  1690. #define CLUSPROP_SZ_DECLARE( name, cch )    
  1691.     struct {                                
  1692.         CLUSPROP_SYNTAX Syntax;             
  1693.         DWORD           cbLength;           
  1694.         WCHAR           sz[(cch + 1) & ~1]; 
  1695.     } name
  1696. #define CLUSPROP_PROPERTY_NAME_DECLARE( name, cch ) CLUSPROP_SZ_DECLARE( name, cch )
  1697. //
  1698. // Cluster resource property enumeration.
  1699. //
  1700. #ifndef _CLUSTER_API_TYPES_
  1701. //
  1702. // Define enumerable types
  1703. //
  1704. typedef enum CLUSTER_RESOURCE_ENUM {
  1705.     CLUSTER_RESOURCE_ENUM_DEPENDS   = 0x00000001,
  1706.     CLUSTER_RESOURCE_ENUM_PROVIDES  = 0x00000002,
  1707.     CLUSTER_RESOURCE_ENUM_NODES     = 0x00000004,
  1708.     CLUSTER_RESOURCE_ENUM_ALL       = (CLUSTER_RESOURCE_ENUM_DEPENDS  |
  1709.                                          CLUSTER_RESOURCE_ENUM_PROVIDES |
  1710.                                          CLUSTER_RESOURCE_ENUM_NODES)
  1711. } CLUSTER_RESOURCE_ENUM;
  1712. typedef enum CLUSTER_RESOURCE_TYPE_ENUM {
  1713.     CLUSTER_RESOURCE_TYPE_ENUM_NODES = 0x00000001,
  1714.     CLUSTER_RESOURCE_TYPE_ENUM_ALL   = (CLUSTER_RESOURCE_TYPE_ENUM_NODES)
  1715. } CLUSTER_RESOURCE_TYPE_ENUM;
  1716. #endif // _CLUSTER_API_TYPES_
  1717. #ifndef MIDL_PASS
  1718. HRESENUM
  1719. WINAPI
  1720. ClusterResourceOpenEnum(
  1721.     IN HRESOURCE hResource,
  1722.     IN DWORD dwType
  1723.     );
  1724. DWORD
  1725. WINAPI
  1726. ClusterResourceGetEnumCount(
  1727.     IN HRESENUM hResEnum
  1728.     );
  1729. DWORD
  1730. WINAPI
  1731. ClusterResourceEnum(
  1732.     IN HRESENUM hResEnum,
  1733.     IN DWORD dwIndex,
  1734.     OUT LPDWORD lpdwType,
  1735.     OUT LPWSTR lpszName,
  1736.     IN OUT LPDWORD lpcchName
  1737.     );
  1738. DWORD
  1739. WINAPI
  1740. ClusterResourceCloseEnum(
  1741.     IN HRESENUM hResEnum
  1742.     );
  1743. DWORD
  1744. WINAPI
  1745. CreateClusterResourceType(
  1746.     IN HCLUSTER hCluster,
  1747.     IN LPCWSTR lpszResourceTypeName,
  1748.     IN LPCWSTR lpszDisplayName,
  1749.     IN LPCWSTR lpszResourceTypeDll,
  1750.     IN DWORD dwLooksAlivePollInterval,
  1751.     IN DWORD dwIsAlivePollInterval
  1752.     );
  1753. DWORD
  1754. WINAPI
  1755. DeleteClusterResourceType(
  1756.     IN HCLUSTER hCluster,
  1757.     IN LPCWSTR lpszResourceTypeName
  1758.     );
  1759. HRESTYPEENUM
  1760. WINAPI
  1761. ClusterResourceTypeOpenEnum(
  1762.     IN HCLUSTER hCluster,
  1763.     IN LPCWSTR lpszResourceTypeName,
  1764.     IN DWORD dwType
  1765.     );
  1766. DWORD
  1767. WINAPI
  1768. ClusterResourceTypeGetEnumCount(
  1769.     IN HRESTYPEENUM hResTypeEnum
  1770.     );
  1771. DWORD
  1772. WINAPI
  1773. ClusterResourceTypeEnum(
  1774.     IN HRESTYPEENUM hResTypeEnum,
  1775.     IN DWORD dwIndex,
  1776.     OUT LPDWORD lpdwType,
  1777.     OUT LPWSTR lpszName,
  1778.     IN OUT LPDWORD lpcchName
  1779.     );
  1780. DWORD
  1781. WINAPI
  1782. ClusterResourceTypeCloseEnum(
  1783.     IN HRESTYPEENUM hResTypeEnum
  1784.     );
  1785. #endif // MIDL_PASS
  1786. //
  1787. // Network-related structures and types.
  1788. //
  1789. #ifndef _CLUSTER_API_TYPES_
  1790. //
  1791. // Define enumerable group types
  1792. //
  1793. typedef enum CLUSTER_NETWORK_ENUM {
  1794.     CLUSTER_NETWORK_ENUM_NETINTERFACES  = 0x00000001,
  1795.     CLUSTER_NETWORK_ENUM_ALL            = CLUSTER_NETWORK_ENUM_NETINTERFACES
  1796. } CLUSTER_NETWORK_ENUM;
  1797. typedef enum CLUSTER_NETWORK_STATE {
  1798.     ClusterNetworkStateUnknown = -1,
  1799.     ClusterNetworkUnavailable,
  1800.     ClusterNetworkDown,
  1801.     ClusterNetworkPartitioned,
  1802.     ClusterNetworkUp
  1803. } CLUSTER_NETWORK_STATE;
  1804. // Role the network plays in the cluster.  This is a bitmask.
  1805. typedef enum CLUSTER_NETWORK_ROLE {
  1806.     ClusterNetworkRoleNone              = 0,
  1807.     ClusterNetworkRoleInternalUse       = 0x00000001,
  1808.     ClusterNetworkRoleClientAccess      = 0x00000002,
  1809.     ClusterNetworkRoleInternalAndClient = 0x00000003
  1810. } CLUSTER_NETWORK_ROLE;
  1811. #endif // _CLUSTER_API_TYPES_
  1812. //
  1813. // Interfaces for managing the networks of a cluster.
  1814. //
  1815. #ifndef MIDL_PASS
  1816. HNETWORK
  1817. WINAPI
  1818. OpenClusterNetwork(
  1819.     IN HCLUSTER hCluster,
  1820.     IN LPCWSTR lpszNetworkName
  1821.     );
  1822. BOOL
  1823. WINAPI
  1824. CloseClusterNetwork(
  1825.     IN HNETWORK hNetwork
  1826.     );
  1827. HCLUSTER
  1828. WINAPI
  1829. GetClusterFromNetwork(
  1830.     IN HNETWORK hNetwork
  1831.     );
  1832. HNETWORKENUM
  1833. WINAPI
  1834. ClusterNetworkOpenEnum(
  1835.     IN HNETWORK hNetwork,
  1836.     IN DWORD dwType
  1837.     );
  1838. DWORD
  1839. WINAPI
  1840. ClusterNetworkGetEnumCount(
  1841.     IN HNETWORKENUM hNetworkEnum
  1842.     );
  1843. DWORD
  1844. WINAPI
  1845. ClusterNetworkEnum(
  1846.     IN HNETWORKENUM hNetworkEnum,
  1847.     IN DWORD dwIndex,
  1848.     OUT LPDWORD lpdwType,
  1849.     OUT LPWSTR lpszName,
  1850.     IN OUT LPDWORD lpcchName
  1851.     );
  1852. DWORD
  1853. WINAPI
  1854. ClusterNetworkCloseEnum(
  1855.     IN HNETWORKENUM hNetworkEnum
  1856.     );
  1857. CLUSTER_NETWORK_STATE
  1858. WINAPI
  1859. GetClusterNetworkState(
  1860.     IN HNETWORK hNetwork
  1861.     );
  1862. DWORD
  1863. WINAPI
  1864. SetClusterNetworkName(
  1865.     IN HNETWORK hNetwork,
  1866.     IN LPCWSTR lpszName
  1867.     );
  1868. DWORD
  1869. WINAPI
  1870. GetClusterNetworkId(
  1871.     IN HNETWORK hNetwork,
  1872.     OUT LPWSTR lpszNetworkId,
  1873.     IN OUT LPDWORD lpcchNetworkId
  1874.     );
  1875. DWORD
  1876. WINAPI
  1877. ClusterNetworkControl(
  1878.     IN HNETWORK hNetwork,
  1879.     IN OPTIONAL HNODE hHostNode,
  1880.     IN DWORD dwControlCode,
  1881.     IN LPVOID lpInBuffer,
  1882.     IN DWORD cbInBufferSize,
  1883.     OUT LPVOID lpOutBuffer,
  1884.     IN DWORD cbOutBufferSize,
  1885.     OUT LPDWORD lpcbBytesReturned
  1886.     );
  1887. #endif // MIDL_PASS
  1888. #ifndef _CLUSTER_API_TYPES_
  1889. //
  1890. // Network interface-related structures and types.
  1891. //
  1892. typedef enum CLUSTER_NETINTERFACE_STATE {
  1893.     ClusterNetInterfaceStateUnknown = -1,
  1894.     ClusterNetInterfaceUnavailable,
  1895.     ClusterNetInterfaceFailed,
  1896.     ClusterNetInterfaceUnreachable,
  1897.     ClusterNetInterfaceUp
  1898. } CLUSTER_NETINTERFACE_STATE;
  1899. #endif // _CLUSTER_API_TYPES_
  1900. //
  1901. // Interfaces for managing the network interfaces of a cluster.
  1902. //
  1903. #ifndef MIDL_PASS
  1904. HNETINTERFACE
  1905. WINAPI
  1906. OpenClusterNetInterface(
  1907.     IN HCLUSTER hCluster,
  1908.     IN LPCWSTR lpszInterfaceName
  1909.     );
  1910. DWORD
  1911. WINAPI
  1912. GetClusterNetInterface(
  1913.     IN HCLUSTER hCluster,
  1914.     IN LPCWSTR lpszNodeName,
  1915.     IN LPCWSTR lpszNetworkName,
  1916.     OUT LPWSTR lpszInterfaceName,
  1917.     IN OUT LPDWORD lpcchInterfaceName
  1918.     );
  1919. BOOL
  1920. WINAPI
  1921. CloseClusterNetInterface(
  1922.     IN HNETINTERFACE hNetInterface
  1923.     );
  1924. HCLUSTER
  1925. WINAPI
  1926. GetClusterFromNetInterface(
  1927.     IN HNETINTERFACE hNetInterface
  1928.     );
  1929. CLUSTER_NETINTERFACE_STATE
  1930. WINAPI
  1931. GetClusterNetInterfaceState(
  1932.     IN HNETINTERFACE hNetInterface
  1933.     );
  1934. DWORD
  1935. WINAPI
  1936. ClusterNetInterfaceControl(
  1937.     IN HNETINTERFACE hNetInterface,
  1938.     IN OPTIONAL HNODE hHostNode,
  1939.     IN DWORD dwControlCode,
  1940.     IN LPVOID lpInBuffer,
  1941.     IN DWORD cbInBufferSize,
  1942.     OUT LPVOID lpOutBuffer,
  1943.     IN DWORD cbOutBufferSize,
  1944.     OUT LPDWORD lpcbBytesReturned
  1945.     );
  1946. #endif // MIDL_PASS
  1947. //
  1948. // Cluster registry update and access routines
  1949. //
  1950. #ifndef MIDL_PASS
  1951. HKEY
  1952. WINAPI
  1953. GetClusterKey(
  1954.     IN HCLUSTER hCluster,
  1955.     IN REGSAM samDesired
  1956.     );
  1957. HKEY
  1958. WINAPI
  1959. GetClusterGroupKey(
  1960.     IN HGROUP hGroup,
  1961.     IN REGSAM samDesired
  1962.     );
  1963. HKEY
  1964. WINAPI
  1965. GetClusterResourceKey(
  1966.     IN HRESOURCE hResource,
  1967.     IN REGSAM samDesired
  1968.     );
  1969. HKEY
  1970. WINAPI
  1971. GetClusterNodeKey(
  1972.     IN HNODE hNode,
  1973.     IN REGSAM samDesired
  1974.     );
  1975. HKEY
  1976. WINAPI
  1977. GetClusterNetworkKey(
  1978.     IN HNETWORK hNetwork,
  1979.     IN REGSAM samDesired
  1980.     );
  1981. HKEY
  1982. WINAPI
  1983. GetClusterNetInterfaceKey(
  1984.     IN HNETINTERFACE hNetInterface,
  1985.     IN REGSAM samDesired
  1986.     );
  1987. LONG
  1988. WINAPI
  1989. ClusterRegCreateKey(
  1990.     IN HKEY hKey,
  1991.     IN LPCWSTR lpszSubKey,
  1992.     IN DWORD dwOptions,
  1993.     IN REGSAM samDesired,
  1994.     IN LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  1995.     OUT PHKEY phkResult,
  1996.     OUT OPTIONAL LPDWORD lpdwDisposition
  1997.     );
  1998. LONG
  1999. WINAPI
  2000. ClusterRegOpenKey(
  2001.     IN HKEY hKey,
  2002.     IN LPCWSTR lpszSubKey,
  2003.     IN REGSAM samDesired,
  2004.     OUT PHKEY phkResult
  2005.     );
  2006. LONG
  2007. WINAPI
  2008. ClusterRegDeleteKey(
  2009.     IN HKEY hKey,
  2010.     IN LPCWSTR lpszSubKey
  2011.     );
  2012. LONG
  2013. WINAPI
  2014. ClusterRegCloseKey(
  2015.     IN HKEY hKey
  2016.     );
  2017. LONG
  2018. WINAPI
  2019. ClusterRegEnumKey(
  2020.     IN HKEY hKey,
  2021.     IN DWORD dwIndex,
  2022.     OUT LPWSTR lpszName,
  2023.     IN OUT LPDWORD lpcchName,
  2024.     OUT PFILETIME lpftLastWriteTime
  2025.     );
  2026. DWORD
  2027. WINAPI
  2028. ClusterRegSetValue(
  2029.     IN HKEY hKey,
  2030.     IN LPCWSTR lpszValueName,
  2031.     IN DWORD dwType,
  2032.     IN CONST BYTE* lpData,
  2033.     IN DWORD cbData
  2034.     );
  2035. DWORD
  2036. WINAPI
  2037. ClusterRegDeleteValue(
  2038.     IN HKEY hKey,
  2039.     IN LPCWSTR lpszValueName
  2040.     );
  2041. LONG
  2042. WINAPI
  2043. ClusterRegQueryValue(
  2044.     IN HKEY hKey,
  2045.     IN LPCWSTR lpszValueName,
  2046.     OUT LPDWORD lpdwValueType,
  2047.     OUT LPBYTE lpData,
  2048.     IN OUT LPDWORD lpcbData
  2049.     );
  2050. DWORD
  2051. WINAPI
  2052. ClusterRegEnumValue(
  2053.     IN HKEY hKey,
  2054.     IN DWORD dwIndex,
  2055.     OUT LPWSTR lpszValueName,
  2056.     IN OUT LPDWORD lpcchValueName,
  2057.     OUT LPDWORD lpdwType,
  2058.     OUT LPBYTE lpData,
  2059.     IN OUT LPDWORD lpcbData
  2060.     );
  2061. LONG
  2062. WINAPI
  2063. ClusterRegQueryInfoKey(
  2064.     IN HKEY hKey,
  2065.     IN LPDWORD lpcSubKeys,
  2066.     IN LPDWORD lpcchMaxSubKeyLen,
  2067.     IN LPDWORD lpcValues,
  2068.     IN LPDWORD lpcchMaxValueNameLen,
  2069.     IN LPDWORD lpcbMaxValueLen,
  2070.     IN LPDWORD lpcbSecurityDescriptor,
  2071.     IN PFILETIME lpftLastWriteTime
  2072.     );
  2073. LONG
  2074. WINAPI
  2075. ClusterRegGetKeySecurity (
  2076.     IN HKEY hKey,
  2077.     IN SECURITY_INFORMATION RequestedInformation,
  2078.     OUT PSECURITY_DESCRIPTOR pSecurityDescriptor,
  2079.     IN LPDWORD lpcbSecurityDescriptor
  2080.     );
  2081. LONG
  2082. WINAPI
  2083. ClusterRegSetKeySecurity(
  2084.     IN HKEY hKey,
  2085.     IN SECURITY_INFORMATION SecurityInformation,
  2086.     IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  2087.     );
  2088. #if _MSC_VER >= 1200
  2089. #pragma warning(pop)              // restore 4200/4201
  2090. #else
  2091. #pragma warning( default : 4200 ) // nonstandard extension used : zero-sized array in struct/union
  2092. #pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
  2093. #endif
  2094. #endif // MIDL_PASS
  2095. #ifdef __cplusplus
  2096. }
  2097. #endif
  2098. #ifndef _CLUSTER_API_TYPES_
  2099. #define _CLUSTER_API_TYPES_
  2100. #endif // _CLUSTER_API_TYPES_
  2101. #endif // _CLUSTER_API_