Skip to content

Add is_key_volatile registry helper#642

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

Add is_key_volatile registry helper#642
benhillis wants to merge 1 commit into
microsoft:masterfrom
benhillis:reg-key-info

Conversation

@benhillis

Copy link
Copy Markdown
Member

Adds wil::reg::is_key_volatile[_nothrow], implemented via NtQueryKey + KeyFlagsInformation (ntdll resolved dynamically). 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.

Add wil::reg::is_key_volatile[_nothrow] to report whether a registry key
was created with REG_OPTION_VOLATILE. There is no Win32 API for this, so
the implementation uses NtQueryKey + KeyFlagsInformation; NtQueryKey is
resolved dynamically from ntdll (keeping wil header-only with no extra
link dependency) and the information class/struct that the public SDK
omits are declared locally.

Adds RegistryTests coverage for volatile and non-volatile keys.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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