_RegEnumValue


include vmm.h

LONG _RegEnumValue(HKEY hkey, DWORD iValue, LPTSTR lpszValue, 
    LPDWORD lpcchValue, LPDWORD lpdwReserved, LPDWORD lpdwType, 
    LPBYTE lpbData, LPDWORD lpcbData)

Enumerates values for the given open registry key; the service copies one indexed value name and data block for the key each time it is called. See the documentation for the Win32 function of the same name for additional information.

ERROR_NO_MORE_ITEMS

ERROR_KEY_DELETED

ERROR_MORE_DATA

ERROR_BADKEY

ERROR_REGISTRY_IO_FAILED

ERROR_REGISTRY_CORRUPT

ERROR_BADDB


hkey

Handle of an open key or one of the predefined keys:

HKEY_CLASSES_ROOT

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE

HKEY_USERS

HKEY_CURRENT_CONFIG

HKEY_DYN_DATA


iValue

Index of the value to retrieve; should be zero for first call to this service and then incremented for each subsequent call. Because values are not ordered, any new value will have an arbitrary index.

lpszValue

Address of buffer that receives name of the value, including the terminating null character.

lpcchValue

Address of variable that specifies the length of the buffer in bytes, including the terminating null character.

lpdwReserved

Reserved; must be NULL.

lpdwType

Address of variable that receives the type code for the value entry. It can be one of these standard values or other value (which is treated like REG_BINARY):

REG_BINARY

Binary data in any form.

REG_SZ

A null-terminated UNICODE or ANSI string.


This parameter can be NULL if the type code is not required.

lpbData

Address of variable that receives the data for the value entry. This parameter can be NULL if the data is not required.

lpcbData

Address of variable that specifies the size, in bytes, of the buffer pointed to by lpbData. When the service returns, the variable contains the number of bytes stored in the buffer.

This parameter can be NULL only if lpbData is NULL.

Of the predefined key values, only HKEY_LOCAL_MACHINE and HKEY_DYN_DATA are available to VxDs during initialization time. The entire registry space can only be accessed after VxD initialization is complete.

The caller should reinitialize the variable containing the buffer size on each subsequent call to this service.