ClusterEnum

The ClusterEnum function enumerates objects in a cluster, returning the name of one object with each call.

DWORD WINAPI ClusterEnum(
  HCLUSENUM hEnum,  
  DWORD dwIndex,    
  LPDWORD lpdwType, 
  LPWSTR lpszName,  
  LPDWORD lpcbName  
);
 

Parameters

hEnum
[in] Handle to an existing enumeration object originally returned by the ClusterOpenEnum function.
dwIndex
[in] Index used to identify the next entry to be enumerated. This parameter should be zero for the first call to ClusterEnum and then incremented for subsequent calls.
lpdwType
[out] Pointer to the type of object returned. One of the following object types is returned with each call:
CLUSTER_ENUM_NODE
The object is a node in the cluster.
CLUSTER_ENUM_RESTYPE
The object is a resource type in the cluster.
CLUSTER_ENUM_RESOURCE
The object is a resource in the cluster.
CLUSTER_ENUM_GROUP
The object is a group in the cluster.
lpszName
[out] Pointer to the name of the returned object, a NULL-terminated string.
lpcbName
[in, out] On input, pointer to a buffer. On output, pointer to the count of characters in the name pointed to by the lpszName parameter minus the terminating NULL character.

Return Values

ERROR_SUCCESS
The operation was successful.
ERROR_NO_MORE_ITEMS
There are no more objects of the requested type to be returned.
ERROR_MORE_DATA
The buffer pointed to by lpszName is not long enough to hold the required number of characters. The lpcbName parameter has been set to the required buffer length.

Remarks

The ClusterEnum function is typically used to iterate through a collection of cluster objects of one or more types. If, for example, an application wants to enumerate all of the nodes in a cluster, it calls ClusterOpenEnum to open a cluster enumerator that can process nodes. The dwType parameter is set to CLUSTER_ENUM_NODE to specify nodes as the object type to be enumerated. If the application wanted to enumerate groups in addition to nodes, it would set dwType to CLUSTER_ENUM_NODE | CLUSTER_ENUM_GROUP. With the handle that ClusterOpenEnum returns, the application calls ClusterEnum repeatedly to retrieve each of the objects. The lpdwType parameter points to the type of object that is retrieved.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.