Skip to content

Add registry delete_value and delete_tree helpers#638

Draft
benhillis wants to merge 1 commit into
microsoft:masterfrom
benhillis:reg-delete-apis
Draft

Add registry delete_value and delete_tree helpers#638
benhillis wants to merge 1 commit into
microsoft:masterfrom
benhillis:reg-delete-apis

Conversation

@benhillis

Copy link
Copy Markdown
Member

Adds wil::reg::delete_value[_nothrow] (RegDeleteValueW + RegDeleteKeyValueW subkey overloads) and delete_tree[_nothrow] (RegDeleteTreeW, swallowing not-found). 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.

Surface public delete APIs for the wil::reg namespace, mirroring the
existing throwing/nothrow pattern used by the rest of the registry
helpers:

- delete_value[_nothrow](key, value_name) -> RegDeleteValueW
- delete_value[_nothrow](key, subKey, value_name) -> RegDeleteKeyValueW
- delete_tree[_nothrow](key, subKey) -> RegDeleteTreeW (recursive,
  succeeds when the subkey is already absent)

The reg_view_t backing methods for RegDeleteValueW/RegDeleteTreeW already
existed; this adds the RegDeleteKeyValueW overload and the public
wrappers, plus coverage in RegistryTests.

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