ClusterRegEnumValue function (clusapi.h)
Enumerates the values of an open cluster database key.
Syntax
DWORD ClusterRegEnumValue(
[in] HKEY hKey,
[in] DWORD dwIndex,
[out] LPWSTR lpszValueName,
[in, out] LPDWORD lpcchValueName,
[out, optional] LPDWORD lpdwType,
[out, optional] LPBYTE lpData,
[in, out, optional] LPDWORD lpcbData
);
Parameters
[in] hKey
Handle of the cluster database key to enumerate.
[in] dwIndex
Index used to identify the next value to be enumerated. This parameter should be zero for the first call to ClusterRegEnumValue and then incremented for subsequent calls.
Because values are not ordered, any new value has an arbitrary index. This means that ClusterRegEnumValue may return values in any order.
[out] lpszValueName
Pointer to a null-terminated Unicode string containing the name of the returned value.
[in, out] lpcchValueName
Pointer to the size of the lpszValueName 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] lpdwType
Pointer to the type code for the value entry, or NULL if the type code is not required. The type code can be one of the following values.
REG_BINARY (3)
Binary data in any form.
REG_DWORD (4)
A 32-bit number.
REG_DWORD_BIG_ENDIAN (5)
A 32-bit number stored in big-endian format.
REG_EXPAND_SZ (2)
A null-terminated Unicode string that contains unexpanded references to environment variables (for example, "%PATH%").
REG_MULTI_SZ (6)
A sequence of null-terminated strings, terminated by an empty string (\0).
The following is an example:
String1\0String2\0String3\0LastString\0\0
The first \0 terminates the first string, the second to the last \0 terminates the last string, and the final \0 terminates the sequence. Note that the final terminator must be factored into the length of the string.
REG_NONE (0)
No defined value type.
REG_QWORD (11)
A 64-bit number.
REG_SZ (1)
A null-terminated Unicode string.
[out, optional] lpData
Pointer to the data for the value entry. This parameter can be NULL if the data is not required.
[in, out, optional] lpcbData
On input, pointer to a count of bytes in the buffer pointed to by the lpbData parameter. On output, pointer to a count of bytes resulting from the operation. This parameter can be NULL only if lpbData is NULL.
Return value
The function returns one of the following values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
There are no more values to be returned. |
|
One of the output buffers (lpszValueName or lpbData) is too small to hold the resulting data. The lpcchValueName and the lpbData parameters indicate the required size (note that lpcchValueName does not include the terminating NULL in the character count). |
The operation failed. |
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 |