ClusterNodeEnum function (clusapi.h)
Enumerates the network interfaces or groups installed on a node, returning the name of each with each call. The PCLUSAPI_CLUSTER_NODE_ENUM type defines a pointer to this function.
Syntax
DWORD ClusterNodeEnum(
[in] HNODEENUM hNodeEnum,
[in] DWORD dwIndex,
[out] LPDWORD lpdwType,
[out] LPWSTR lpszName,
[in, out] LPDWORD lpcchName
);
Parameters
[in] hNodeEnum
Handle to an existing enumeration object originally returned by the ClusterNodeOpenEnum function.
[in] dwIndex
Index used to identify the next entry to be enumerated. This parameter should be zero for the first call to ClusterNodeEnum and then incremented for subsequent calls.
[out] lpdwType
Pointer to the type of object returned. The following value of the CLUSTER_NODE_ENUM enumeration is returned with each call.
CLUSTER_NODE_ENUM_NETINTERFACES (1)
The object is a network interface.
CLUSTER_NODE_ENUM_GROUPS (0x00000002)
The object is a cluster group.
Windows Server 2008: The CLUSTER_NODE_ENUM_GROUPS value is not supported before Windows Server 2008 R2.
[out] lpszName
Pointer to a null-terminated Unicode string containing the name of the returned object.
[in, out] lpcchName
Pointer to the size of the lpszName 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.
Return value
The function returns one of the following values.
Return code/value | Description |
---|---|
|
The operation completed successfully. |
|
No more data is available. This value is returned if there are no more objects of the requested type to be returned. |
|
More data is available. This value is returned if the buffer pointed to by lpszName is not big enough to hold the result. The lpcchName parameter returns the number of characters in the result, excluding the terminating NULL. |
Remarks
To use ClusterNodeEnum, applications first open a node enumeration handle by calling ClusterNodeOpenEnum with the dwType parameter set to CLUSTER_NODE_ENUM_NETINTERFACES. For more information, see Enumerating Objects.
Note that the lpcchName parameter 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.
Examples
See Enumerating Objects.
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 |