GetClusterInformation function (clusapi.h)
Retrieves a cluster's name and version. The PCLUSAPI_GET_CLUSTER_INFORMATION type defines a pointer to this function.
Syntax
DWORD GetClusterInformation(
[in] HCLUSTER hCluster,
[out] LPWSTR lpszClusterName,
[in, out] LPDWORD lpcchClusterName,
[out, optional] LPCLUSTERVERSIONINFO lpClusterInfo
);
Parameters
[in] hCluster
Handle to a cluster.
[out] lpszClusterName
Pointer to a null-terminated Unicode string containing the name of the cluster identified by hCluster.
[in, out] lpcchClusterName
Pointer to the size of the lpszClusterName buffer as a count of characters. On input, specify the maximum number of characters the buffer can hold, including the terminating NULL. On output, specifies the number of characters in the resulting name, excluding the terminating NULL.
[out, optional] lpClusterInfo
Either NULL or a pointer to a
CLUSTERVERSIONINFO structure describing the version
of the Cluster service. When
lpClusterInfo is not NULL, the
dwVersionInfoSize member of this structure should be set as follows:
lpClusterInfo->dwVersionInfoSize = sizeof(CLUSTERVERSIONINFO);
Return value
If the operation succeeds, the function returns ERROR_SUCCESS (0).
If the operation fails, the function returns a system error code. The following is one of the possible values.
Return code | Description |
---|---|
|
The buffer pointed to by lpszClusterName is not big enough to hold the result. The lpcchClusterName parameter returns the number of characters in the result, excluding the terminating NULL. |
Remarks
Note that lpcchClusterName refers to a count of characters and not a count of bytes, and that the returned size does not include the terminating NULL in the count. For more information on sizing buffers, see Data Size Conventions.
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 |