_RegQueryMultipleValues

include vmm.h

DWORD _RegQueryMultipleValues(HKEY hKey, PVALENT pValent, 
    DWORD dwNumVals, LPSTR lpValueBuf, LPDWORD lpTotSize) 
 

Retrieves the values for the names specified in the pValent parameter for the specified key in the registry. See the documentation for the Win32 function of the same name for additional information.

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

pValent
Array of VALENT structures specifying value names to retrieve values for. The VALENT structure has the following format:
typedef struct value_ent {
    PCHAR ve_valuename;
    DWORD ve_valuelen;
    DWORD ve_valueptr;
    DWORD ve_type;
} VALENT;
 
dwNumVals
Number of VALENT structures in the pValent array.
lpValueBuf
Address of a buffer that receives the value data.
lpTotSize
Number of bytes in the lpValueBuf parameter.

RegQueryMultipleValues is useful for dynamic key providers because it assures consistency of data by retrieving multiple values in an atomic operation. For all keys, this service, is more efficient than calling RegQueryValue multiple times, particularly across a network since it can retrieve the values with one network transaction.

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.