ResUtilGetClusterRoleState function (resapi.h)

Determines whether or not a specific role has been assigned to a cluster.

Syntax

CLUSTER_ROLE_STATE ResUtilGetClusterRoleState(
  [in] HCLUSTER     hCluster,
  [in] CLUSTER_ROLE eClusterRole
);

Parameters

[in] hCluster

The handle of the queried cluster.

[in] eClusterRole

The role the cluster was queried about. The possible values for this parameter are enumerators from the CLUSTER_ROLE enumeration. The following values are valid.

ClusterRoleDHCP (0)

This enumerator represents the DHCP Service cluster role.

ClusterRoleDTC (1)

This enumerator represents the Distributed Transaction Coordinator cluster role.

ClusterRoleFileServer (2)

This enumerator represents the File Share cluster role.

ClusterRoleGenericApplication (3)

This enumerator represents the Generic Application cluster role.

ClusterRoleGenericScript (4)

This enumerator represents the Generic Script cluster role.

ClusterRoleGenericService (5)

This enumerator represents the Generic Service cluster role.

ClusterRoleISCSINameServer (6)

This enumerator represents the Microsoft iSNS cluster role.

ClusterRoleMSMQ (7)

This enumerator represents the Microsoft Message Queue cluster role.

ClusterRoleNFS (8)

This enumerator represents the NFS Share cluster role.

ClusterRolePrintServer (9)

This enumerator represents the Print Spooler cluster role.

ClusterRoleStandAloneNamespaceServer (10)

This enumerator represents a specialized File Share cluster role.

ClusterRoleVolumeShadowCopyServiceTask (11)

This enumerator represents the Volume Shadow Copy Service Task cluster role.

ClusterRoleWINS (12)

This enumerator represents the WINS Service cluster role.

Return value

The possible return values for this function are enumerators from the CLUSTER_ROLE_STATE enumeration. The following values are valid.

Return code/value Description
ClusterRoleUnknown
-1
It is unknown whether or not the role is clustered. If this value is returned then an error has occurred. For more information call GetLastError.
ClusterRoleClustered
0
The role is clustered.
ClusterRoleUnclustered
1
The role is not clustered.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 Datacenter, Windows Server 2008 Enterprise
Target Platform Windows
Header resapi.h
Library ResUtils.lib; ResApi.lib on Windows Server 2008 R2 and Windows Server 2008
DLL ResUtils.dll

See also

CLUSTER_ROLE

CLUSTER_ROLE_STATE

Resource Utility Functions