summaryrefslogtreecommitdiff
path: root/ext/win32/lib/win32/registry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/win32/lib/win32/registry.rb')
-rw-r--r--ext/win32/lib/win32/registry.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb
index 6c678e49db..0b4e5870a5 100644
--- a/ext/win32/lib/win32/registry.rb
+++ b/ext/win32/lib/win32/registry.rb
@@ -212,6 +212,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
# Win32 APIs
#
module API
+ include Constants
extend Importer
dlload "advapi32.dll"
[
@@ -289,7 +290,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
name = WCHAR_NUL * Constants::MAX_KEY_LENGTH
size = packdw(Constants::MAX_KEY_LENGTH)
check RegEnumValueW.call(hkey, index, name, size, 0, 0, 0, 0)
- name[0, unpackdw(size)/WCHAR_SIZE].encode
+ name[0, unpackdw(size)].encode
end
def EnumKey(hkey, index)