Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2148 lines
56 KiB

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