Enumerates the values for the specified open registry key. The function copies one indexed value name and data block for the key each time it is called.
LONG RegEnumValue( HKEY hKey, DWORD dwIndex, LPTSTR lpValueName, LPDWORD lpcValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData );
hKey
hKey
.
dwIndex
RegEnumValue
and then be incremented for subsequent calls. Because values are not ordered, any new value has an arbitrary index. This means that the call may return values in any order.
lpValueName
lpcValueName
lpValueName
parameter. This size should include the terminating null character. When the call returns, the variable pointed to by lpcValueName
contains the number of characters stored in the buffer. The count returned does not include the terminating null character.
lpReserved
lpType
REG_BINARY |
Binary data in any form. |
REG_DWORD |
A 32-bit number. |
REG_DWORD_LITTLE_ENDIAN |
A 32-bit number in little-endian format. This is equivalent to REG_DWORD. |
REG_DWORD_BIG_ENDIAN |
A 32-bit number in big-endian format. |
REG_EXPAND_SZ |
A null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It is either a Unicode or ANSI string, depending on whether you use the Unicode or ANSI calls. |
REG_LINK |
A Unicode symbolic link. |
REG_MULTI_SZ |
An array of null-terminated strings, terminated by two null characters. |
REG_NONE |
No defined value type. |
REG_RESOURCE_LIST |
A device-driver resource list. |
REG_SZ |
A null-terminated string. It is either a Unicode or ANSI string, depending on whether you use the Unicode or ANSI calls.
If the type code is not required, the lpType parameter can be NULL. |
lpData
lpcbData
lpData
parameter. When the call returns, the variable pointed to by the lpcbData parameter contains the number of bytes stored in the buffer. This parameter can be NULL, only if lpData
is NULL. To enumerate values, an application should initially call RegEnumValue with the dwIndex parameter set to zero. The application should then increment dwIndex and call RegEnumValue until no more values exist (until the call returns ERROR_NO_MORE_ITEMS).
The application can also set dwIndex to the index of the last value on the first call to the call and decrement the index until the value with index 0 is enumerated. To retrieve the index of the last value, use RegQueryInfoKey.
While using RegEnumValue, an application should not call any registration calls that might change the key being queried.
The key identified by the hKey parameter must be opened with KEY_QUERY_VALUE access. To open the key, use RegCreateKeyEx or RegOpenKeyEx.
To determine the maximum size of the name and data buffers, use RegQueryInfoKey.
ERROR_SUCCESS
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/iwin32.h | iwin32.h iwin32rt.h |
rt.lib |
Note
This function operates in the real-time portion of your application.
RegCreateKeyEx, RegEnumKeyEx, RegOpenKeyEx, RegQueryInfoKey, iwin32 API, iwin32 Overview