home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / clusapi.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  61KB  |  2,165 lines

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