CreateClusterGroup function (clusapi.h)

Adds a group to a cluster and returns a handle to the newly added group. The PCLUSAPI_CREATE_CLUSTER_GROUP type defines a pointer to this function.

Syntax

HGROUP CreateClusterGroup(
  [in] HCLUSTER hCluster,
  [in] LPCWSTR  lpszGroupName
);

Parameters

[in] hCluster

Handle to the target cluster.

[in] lpszGroupName

Pointer to a null-terminated Unicode string containing the name of the group to be added to the cluster identified by hCluster. If there is not a group by this name, CreateClusterGroup creates it.

Return value

If the operation succeeds, the function returns a group handle.

If the operation fails, the function returns NULL. For more information about the error, call GetLastError.

Remarks

Do not call CreateClusterGroup from a resource DLL. For more information, see Function Calls to Avoid in Resource DLLs.

The CreateClusterGroup function calls the CreateClusterGroupEx function with a NULL CLUSTER_CREATE_GROUP_INFO. The new group is created with a group type of ClusGroupTypeUnknown.

Examples

See Creating Groups.

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

See also

OpenClusterGroup