Module: Win32::Registry::API

Extended by:
Chef::ReservedNames::Win32::API::Registry
Defined in:
lib/chef/monkey_patches/win32/registry.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.DeleteKey(hkey, name) ⇒ Object

::Win32::Registry#delete_key uses RegDeleteKeyW. We need to use RegDeleteKeyExW to properly support WOW64 systems.



42
43
44
# File 'lib/chef/monkey_patches/win32/registry.rb', line 42

def DeleteKey(hkey, name)
  check RegDeleteKeyExW(hkey, name.to_wstring, 0, 0)
end

Instance Method Details

#DeleteValue(hkey, name) ⇒ Object

::Win32::Registry#delete_value is broken in Ruby 2.1 (up to Ruby 2.1.6). This should be resolved in a later release (see note #9 in link below). bugs.ruby-lang.org/issues/10820



35
36
37
# File 'lib/chef/monkey_patches/win32/registry.rb', line 35

def DeleteValue(hkey, name)
  check RegDeleteValueW(hkey, name.to_wstring)
end