include vmm.h
LONG _RegEnumKey(HKEY hkey, DWORD iSubKey, LPTSTR lpszName, DWORD cchName)
Enumerates subkeys of the given open registry key; retrieves the name of one subkey each time the service 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_CLASSES_ROOT |
HKEY_CURRENT_USER |
HKEY_LOCAL_MACHINE |
HKEY_USERS |
HKEY_CURRENT_CONFIG |
HKEY_DYN_DATA |
Because subkeys are not ordered, any new subkey will have an arbitrary index.
To retrieve the index of the last subkey, use RegQueryInfoKey or increment iSubKey until ERROR_NO_MORE_ITEMS is returned.
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.