ClusterRegEnumKey function

Enumerates the subkeys of an open cluster database key.

Syntax


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

Parameters

hKey [in]

HKEY specifying a currently open key.

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 has 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 null-terminating character. The function copies only the name of the subkey, not the full key hierarchy, to the buffer.

lpcchName [in, out]

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.

lpftLastWriteTime [out, optional]

Pointer to the last time the enumerated subkey was modified.

Return value

The function returns one of the following values.

ERROR_SUCCESS

0

The operation was successful.

ERROR_NO_MORE_ITEMS

259 (0x103)

There are no more subkeys to be returned.

ERROR_MORE_DATA

234 (0xEA)

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.

System error code

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

Cluster Registry Access Functions
ClusterRegOpenKey

 

 

Show: