Project

General

Profile

Actions

Bug #10820

closed

Win32 Registry Delete uses ANSI instead of Wide APIs

Added by ferventcoder (Rob Reynolds) almost 10 years ago. Updated about 2 years ago.

Status:
Closed
Assignee:
Target version:
-
[ruby-core:67958]

Description

https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/registry.rb#L236-L237

Contains:

    module API
      include Constants
      extend Importer
      dlload "advapi32.dll"
      [
        "long RegOpenKeyExW(void *, void *, long, long, void *)",
        "long RegCreateKeyExW(void *, void *, long, long, long, long, void *, void *, void *)",
        "long RegEnumValueW(void *, long, void *, void *, void *, void *, void *, void *)",
        "long RegEnumKeyExW(void *, long, void *, void *, void *, void *, void *, void *)",
        "long RegQueryValueExW(void *, void *, void *, void *, void *, void *)",
        "long RegSetValueExW(void *, void *, long, long, void *, long)",
        "long RegDeleteValue(void *, void *)",
        "long RegDeleteKey(void *, void *)",
        "long RegFlushKey(void *)",
        "long RegCloseKey(void *)",
        "long RegQueryInfoKey(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *)",
      ].each do |fn|
        cfunc = extern fn, :stdcall
        const_set cfunc.name.intern, cfunc
      end

Should use RegDeleteValueW and RegDeleteKeyW.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0