GetNodeClusterState function (clusapi.h)

Determines whether the Cluster service is installed and running on a node. The PCLUSAPI_GET_NODE_CLUSTER_STATE type defines a pointer to this function.

Syntax

DWORD GetNodeClusterState(
  [in, optional] LPCWSTR lpszNodeName,
  [out]          LPDWORD pdwClusterState
);

Parameters

[in, optional] lpszNodeName

Pointer to a null-terminated Unicode string containing the name of the node to query. If lpszNodeName is NULL, the local node is queried.

[out] pdwClusterState

Pointer to a value describing the state of the Cluster service on the node. A node will be described by one of the following NODE_CLUSTER_STATE enumeration values.

ClusterStateNotInstalled (0)

The Cluster service is not installed on the node.

ClusterStateNotConfigured (1)

The Cluster service is installed on the node but has not yet been configured.

ClusterStateNotRunning (3)

The Cluster service is installed and configured on the node but is not currently running.

ClusterStateRunning (19 (0x13))

The Cluster service is installed, configured, and running on the node.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS (0). If the operation fails, the function returns a system error code.

Remarks

Note  The GetNodeClusterState function does not support a 64-bit Windows-based node if the calling application is 32-bit Windows-based.

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

NODE_CLUSTER_STATE

Node Management Functions