Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Win32::Registry#each
each
ext/win32/lib/win32/registry.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/ext/win32/lib/win32/registry.rb, line 577
def each_value
return enum_for(:each_value) unless block_given?
index = 0
while true
begin
subkey = API.EnumValue(@hkey, index)
rescue Error
break
end
subkey = export_string(subkey)
begin
type, data = read(subkey)
rescue Error
else
yield subkey, type, data
end
index += 1
end
index
end
Alias of #each_value
Enumerate all values in this registry path.
For each value it yields key, type and data.
key is a String which contains name of key. type is a type contant kind of Win32::Registry::REG_* data is the value of this key.