Module: Win32::Registry::API
- Extended by:
- Chef::ReservedNames::Win32::API::Registry
- Defined in:
- lib/chef/monkey_patches/win32/registry.rb
Class Method Summary collapse
-
.DeleteKey(hkey, name) ⇒ Object
::Win32::Registry#delete_key uses RegDeleteKeyW.
-
.DeleteValue(hkey, name) ⇒ Object
::Win32::Registry#delete_value uses RegDeleteValue which is not an imported function after bug 10820 was solved.
Class Method Details
.DeleteKey(hkey, name) ⇒ Object
::Win32::Registry#delete_key uses RegDeleteKeyW. We need to use RegDeleteKeyExW to properly support WOW64 systems. Still a bug in trunk as of March 21, 2016 (Ruby 2.3.0)
54 55 56 |
# File 'lib/chef/monkey_patches/win32/registry.rb', line 54 def DeleteKey(hkey, name) check RegDeleteKeyExW(hkey, name.to_wstring, 0, 0) end |
.DeleteValue(hkey, name) ⇒ Object
::Win32::Registry#delete_value uses RegDeleteValue which is not an imported function after bug 10820 was solved. So we overwrite it to call the correct imported function. https://bugs.ruby-lang.org/issues/10820 Still a bug in trunk as of March 21, 2016 (Ruby 2.3.0)
47 48 49 |
# File 'lib/chef/monkey_patches/win32/registry.rb', line 47 def DeleteValue(hkey, name) check RegDeleteValueW(hkey, name.to_wstring) end |