Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Win32::Registry::API#QueryValue
QueryValue(hkey, name)
ext/win32/lib/win32/registry.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/ext/win32/lib/win32/registry.rb, line 316
def QueryValue(hkey, name)
type = packdw(0)
size = packdw(0)
name = make_wstr(name)
check RegQueryValueExW.call(hkey, name, 0, type, 0, size)
data = "\0".force_encoding('ASCII-8BIT') * unpackdw(size)
check RegQueryValueExW.call(hkey, name, 0, type, data, size)
[ unpackdw(type), data[0, unpackdw(size)] ]
end
No documentation available