home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / clusapi.h < prev    next >
C/C++ Source or Header  |  2000-02-01  |  69KB  |  2,468 lines

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