Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HKEY_CURRENT_USER_LOCAL_SETTINGS should be supported #1332

Closed
Dani-Hub opened this issue Apr 2, 2021 · 2 comments · Fixed by #1336
Closed

HKEY_CURRENT_USER_LOCAL_SETTINGS should be supported #1332

Dani-Hub opened this issue Apr 2, 2021 · 2 comments · Fixed by #1336

Comments

@Dani-Hub
Copy link
Contributor

Dani-Hub commented Apr 2, 2021

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);
@dbwiddis
Copy link
Contributor

The code in the jna-platform artifact (the com.sun.jna.platform.* packages) are all user-contributed. Please submit a PR with these changes!

@Dani-Hub
Copy link
Contributor Author

Pull request submitted: 1336

@dbwiddis dbwiddis linked a pull request Apr 15, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants