_RegEnumValue


DWORD _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 one of the predefined root keys given in Predefined Keys.

iValue

Index of the value name to retrieve. This should be zero for the first call to this service.

lpszValue

Address of a buffer that receives the name of the value. Can be NULL if value name is not required.

lpcbValueName

Address of a 32-bit variable that contains the size, in bytes, of the lpszValue buffer. The variable receives the size, in bytes, of the retrieved value name. Can be NULL only if lpszValue is NULL.

lpdwReserved

Reserved; should be set to NULL by the caller.

lpdwType

Address of a 32-bit variable that receives the data type for the given value name. Can be NULL if data type is not needed.

lpbData

Address of a buffer that receives the value data for the given value name. Can be NULL if value data is not required.

lpcbData

Address of a 32-bit variable that contains the size, in bytes, of the lpbData buffer. This variable receives the size, in bytes, of the retrieved value 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.