Enumerating Registry Keys

Use the RegEnumKeyEx function to enumerate the subkeys of a specified key. Call the RegEnumValue function to enumerate the values in a specified key. Both functions receive an index number that moves the function to the next key or value. When there are no more keys or values to return, both functions return the ERROR_NO_MORE_ITEMS value.