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.

2689 lines
76 KiB

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