Enumerates the values for the specified open registry key. The call copies one indexed value name and data block for the key each time it is called.
LONG RtRegEnumValue( HKEY hKey, // handle to key to query DWORD dwIndex, // index of value to query LPTSTR lpValueName, // address of buffer for value string LPDWORD lpcbValueName, // address for size of value buffer LPDWORD lpReserved, // reserved LPDWORD lpType, // address of buffer for type code LPBYTE lpData, // address of buffer for value data LPDWORD lpcbData // address for size of data buffer )
hKey
dwIndex
RtRegEnumValue
and then be incremented for subsequent calls.lpValueName
lpcbValueName
lpValueName
parameter. This size should include the terminating null character. When the call returns, the variable pointed to by lpcbValueName
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. The lpType parameter can be NULL if the type code is not required. |
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 RtRegEnumValue with the dwIndex parameter set to zero. The application should then increment dwIndex and call RtRegEnumValue until there are no more values (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 RtRegQueryInfoKey.
While using RtRegEnumValue, an application should not call any registration calls that might change the key being queried.
The key identified by the hKey parameter must have been opened with KEY_QUERY_VALUE access. To open the key, use RtRegCreateKeyEx or RtRegOpenKeyEx.
To determine the maximum size of the name and data buffers, use RtRegQueryInfoKey.
ERROR_SUCCESS
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |
Registry system calls, RtRegQueryInfoKey, RtRegEnumValue, RtRegCreateKeyEx, RtRegOpenKeyEx, RtRegEnumKeyEx