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)
43 44 45 |
# File 'lib/chef/monkey_patches/win32/registry.rb', line 43 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. bugs.ruby-lang.org/issues/10820 Still a bug in trunk as of March 21, 2016 (Ruby 2.3.0)
36 37 38 |
# File 'lib/chef/monkey_patches/win32/registry.rb', line 36 def DeleteValue(hkey, name) check RegDeleteValueW(hkey, name.to_wstring) end |