KEMBAR78
Generalize support for access rights in `windows-registry` by kennykerr · Pull Request #3482 · microsoft/windows-rs · GitHub
Skip to content

Conversation

@kennykerr
Copy link
Collaborator

Building on #3461, this update generalizes support for access rights so that a caller can request more than just read/write access. I decided against adding an enum declaring the various known access rights as that just leads to the inevitable confusion around which ones to use, how they might be combined, and which obscure access rights to include in the library. If you're unsure just use read() or write() and move on. 😊

I also refined the OpenOptions to be additive-only to simplify things. So rather than having to say options.read(true).write(true) you can simply say options.read().write() and so on.

Fixes: #3474

@justanotheranonymoususer

Looks great, thanks! I also like that you can now just use KEY_QUERY_VALUE instead of KEY_READ when that's the only perm you need.

@kennykerr kennykerr merged commit 7269206 into master Feb 12, 2025
78 checks passed
@kennykerr kennykerr deleted the registry-access-options branch February 12, 2025 20:34
@kennykerr kennykerr mentioned this pull request Feb 21, 2025
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 this pull request may close these issues.

Add support for KEY_WOW64_32KEY/KEY_WOW64_64KEY in registry API

2 participants