ClusterOpenEnum function (clusapi.h)
Opens an enumerator for iterating through cluster objects in a cluster. The PCLUSAPI_CLUSTER_OPEN_ENUM type defines a pointer to this function.
Syntax
HCLUSENUM ClusterOpenEnum(
[in] HCLUSTER hCluster,
[in] DWORD dwType
);
Parameters
[in] hCluster
A handle to a cluster.
[in] dwType
A bitmask that describes the type of objects to be enumerated. One or more of the following values of the CLUSTER_ENUM enumeration are valid.
CLUSTER_ENUM_NODE (1 (0x1))
Enumerates the nodes in the cluster.
CLUSTER_ENUM_RESTYPE (2 (0x2))
Enumerates the resource types in the cluster.
CLUSTER_ENUM_RESOURCE (4 (0x4))
Enumerates the resources in the cluster.
CLUSTER_ENUM_GROUP (8 (0x8))
Enumerates the groups in the cluster.
CLUSTER_ENUM_NETWORK (16 (0x10))
Enumerates the networks in the cluster.
CLUSTER_ENUM_NETINTERFACE (32 (0x20))
Enumerates the network interfaces in the cluster.
CLUSTER_ENUM_SHARED_VOLUME_RESOURCE (1073741824 (0x40000000))
Enumerates the cluster shared volumes that are used by the cluster.
CLUSTER_ENUM_INTERNAL_NETWORK (2147483648 (0x80000000))
Enumerates the networks that are used by the cluster for internal communication. The networks are enumerated in order of highest-to-lowest priority as established by SetClusterNetworkPriorityOrder.
CLUSTER_ENUM_ALL ((CLUSTER_ENUM_NODE | CLUSTER_ENUM_RESTYPE | CLUSTER_ENUM_RESOURCE | CLUSTER_ENUM_GROUP | CLUSTER_ENUM_NETWORK | CLUSTER_ENUM_NETINTERFACE))
Enumerates all cluster objects.
Return value
If the operation succeeds, ClusterOpenEnum returns a handle to a cluster enumerator.
If the operation fails, the function returns NULL. For more information about the error, call the function GetLastError.
Remarks
Applications call the ClusterOpenEnum function to
create a particular type of enumerator.
ClusterOpenEnum can create enumerators for iterating
through groups, nodes, resource types, resources, or all of these. For example, an application can call
ClusterOpenEnum to get an enumeration of all of the
nodes and groups in a cluster by specifying
CLUSTER_ENUM_GROUP | CLUSTER_ENUM_NODE
in the
dwType parameter.
ClusterOpenEnum returns a handle that can be passed
to ClusterEnum to access each of the cluster groups or
nodes and to ClusterCloseEnum to release the
enumerator.
Examples
See Enumerating Objects.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 Enterprise, Windows Server 2008 Datacenter |
Target Platform | Windows |
Header | clusapi.h |
Library | ClusAPI.lib |
DLL | ClusAPI.dll |