Skip to content

Add key_options/key_disposition support to create_*_key helpers#640

Draft
benhillis wants to merge 1 commit into
microsoft:masterfrom
benhillis:reg-create-key-options
Draft

Add key_options/key_disposition support to create_*_key helpers#640
benhillis wants to merge 1 commit into
microsoft:masterfrom
benhillis:reg-create-key-options

Conversation

@benhillis

Copy link
Copy Markdown
Member

Adds key_options (volatile) and key_disposition (created vs opened-existing) support to the create_*_key[_nothrow] helpers. Includes Catch2 [registry] tests passing in normal & noexcept configs. Part of enabling WSL to drop its in-house registry helper in favor of wil::reg.

Extend the wil::reg create-key helpers so callers can request a volatile
key and observe whether the key was newly created:

- New key_options enum (non_volatile / is_volatile) mapped to the
  RegCreateKeyExW dwOptions parameter.
- New key_disposition enum (created_new / opened_existing) surfaced via
  an optional out-parameter that mirrors lpdwDisposition.

create_unique_key, create_shared_key, and their _nothrow counterparts
gain defaulted options/disposition parameters, so existing call sites are
unaffected. Adds RegistryTests coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benhillis benhillis force-pushed the reg-create-key-options branch from fd100b1 to 07a859c Compare June 12, 2026 15:40
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.

1 participant