ClusterRegEnumKey function (clusapi.h)
Enumerates the subkeys of an open cluster database key.
Syntax
LONG ClusterRegEnumKey(
[in] HKEY hKey,
[in] DWORD dwIndex,
[out] LPWSTR lpszName,
[in, out] LPDWORD lpcchName,
[out, optional] PFILETIME lpftLastWriteTime
);
Parameters
[in] hKey
HKEY specifying a currently open key.
[in] dwIndex
Index used to identify the next subkey to be enumerated. This parameter should be zero for the first call to ClusterRegEnumKey and then incremented for subsequent calls.
Because subkeys are not ordered, any new subkey has an arbitrary index. This means that ClusterRegEnumKey may return subkeys in any order.
[out] lpszName
Pointer to a buffer that receives the name of the subkey, including the null-terminating character. The function copies only the name of the subkey, not the full key hierarchy, to the buffer.
[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.
[out, optional] lpftLastWriteTime
Pointer to the last time the enumerated subkey was modified.
Return value
The function returns one of the following values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
There are no more subkeys to be returned. |
|
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. |
The operation failed. |
Remarks
The ClusterRegEnumKey function retrieves information about one subkey each time it is called.
Because ClusterRegEnumKey enumerates keys from the root of the database on the node on which the application is running when hKey is set to NULL, ClusterRegEnumKey fails if the node is not part of a cluster.
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 |