GetClusterGroupState

The GetClusterGroupState function returns the current state of a group.

CLUSTER_GROUP_STATE WINAPI GetClusterGroupState(
  HGROUP hGroup,        
  LPWSTR lpszNodeName,  
  LPDWORD lpcbNodeName  
);
 

Parameters

hGroup
[in] Handle to the group for which state information should be returned.
lpszNodeName
[out] Optional pointer to the name of the node in the cluster where the group identified by hGroup is currently online or NULL.
lpcbNodeName
[in, out] On input, pointer to a count of characters in the buffer pointed to by lpszNodeName, including the terminating NULL character. On output, pointer to a count of characters in the name contained in the buffer pointed to by lpszNodeName, excluding the terminating NULL character.

Return Values

If the operation was successful, GetClusterGroupState returns the current state of the group, which is represented by one of the following values:

State Description
ClusterGroupFailed The group is not operational but has not yet been taken offline.
ClusterGroupOnline The group is operational.
ClusterGroupOffline The group is not operational.
ClusterGroupPartialOnline One or more of the resources in the group has been brought online.

If the operation was unsuccessful, this function returns ClusterGroupStateUnknown. For more detailed information about the error, call the Win32 function GetLastError.

QuickInfo

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