ClusterRegEnumKey

The ClusterRegEnumKey function enumerates the subkeys of an open cluster database key.

LONG WINAPI ClusterRegEnumKey(
  HKEY hKey,                   
  DWORD dwIndex,               
  LPWSTR lpszName,             
  LPDWORD lpcchName,           
  PFILETIME lpftLastWriteTime  
);
 

Parameters

hKey
[in] Currently open key, or NULL. If NULL is specified, ClusterRegEnumKey enumerates keys from the root of the cluster database on the node on which the application is running.
dwIndex
[in] 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 will have an arbitrary index. This means that ClusterRegEnumKey may return subkeys in any order.

lpszName
[out] Pointer to a buffer that receives the name of the subkey, including the terminating NULL character. The function copies only the name of the subkey, not the full key hierarchy, to the buffer.
lpcchName
[in, out] On input, pointer to a count of characters in the buffer pointed to by the lpszName parameter including the terminating NULL character. On output, pointer to a count of characters stored in the buffer, excluding the terminating NULL character.
lpftLastWriteTime
[out] Pointer to the last time the enumerated subkey was modified.

Return Values

ERROR_SUCCESS
The operation was successful.
ERROR_NO_MORE_ITEMS
There are no more subkeys to be returned.

If the operation was unsuccessful due to a problem other than not having any more subkeys to return, ClusterRegEnumKey returns a Win32 error value.

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.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.