LDR_RegEnumValue

DWORD LDR_RegEnumValue(HKEY hKey, DWORD iValue, LPSTR lpszValue, 
      LPDWORD lpcbValueName, LPDWORD lpdwReserved, LPDWORD lpdwType, 
      LPBYTE lpbData, LPDWORD lpcbData)
 

Enumerates the value names and values of a given registry key.

hKey
Handle of a previously opened key or is the HKEY_LOCAL_MACHINE key.
iValue
Index of the value name to retrieve. This should be zero for the first call to this function.
lpszValue
Address of a buffer that receives the name of the value. Can be NULL if value names are not required.
lpcbValueName
Address of a variable that contains the size, in bytes, of buffer. This variable receives the size, in bytes, of the retrieved value name. Can be NULL only if lpszValue is NULL.
lpdwReserved
Reserved; set to NULL.
lpdwType
Address of a 32-bit variable that receives the data type of the given value name. Can be NULL if data type is not needed.
lpbData
Address of a buffer that receives the value of the given value name. Can be NULL if value data is not required.
lpcbData
Address of a 32-bit variable buffer that contains the size, in bytes, of the lpbData buffer. This variable receives the size, in bytes, of the retrieved data. Can be NULL only if lpbData parameter is also NULL.

The virtual device should initially set iValue to zero, then increment it on successive calls.