Skip to content

HKEY_CURRENT_USER_LOCAL_SETTINGS should be supported #1332

@Dani-Hub

Description

@Dani-Hub

Provide complete information about the problem

  1. Version of JNA and related jars: 5.8.0

  2. Version and vendor of the java virtual machine: Java-11 AdoptOpenJDK

  3. Operating system: Windows 10

  4. System architecture (CPU type, bitness of the JVM): JVM: 64-bit, processor Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz, 3301 MHz, 4 Kern(e), 4 logische(r) Prozessor(en)

  5. Starting with Windows 7, Windows added the additional HKEY constant HKEY_CURRENT_USER_LOCAL_SETTINGS (see predefined-key) whose underlying integral value has the value 0x80000007 (Source: Visual Studio 2017, header <winreg.h>. This constant is currently missing in the existing set of HKEY_* constants in com.sun.jna.platform.win32.WinReg.

  6. Steps to reproduce: Try to compile the following Java code:

HKEY root = WinReg.HKEY_CURRENT_USER_LOCAL_SETTINGS;

The code is rejected.

The suggested fix is to add the following additional constant to com.sun.jna.platform.win32.WinReg:

HKEY HKEY_CURRENT_USER_LOCAL_SETTINGS = new HKEY(0x80000007);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions