Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/wil/registry_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ namespace reg

// Open key for reading and writing from 64-bit registry. Equivalent to KEY_ALL_ACCESS.
readwrite64,

// Open key for reading from 32-bit registry.
read32,

// Open key for reading and writing from 32-bit registry. Equivalent to KEY_ALL_ACCESS.
readwrite32,
};

/// @cond
Expand Down Expand Up @@ -115,6 +121,10 @@ namespace reg
return KEY_READ | KEY_WOW64_64KEY;
case key_access::readwrite64:
return KEY_ALL_ACCESS | KEY_WOW64_64KEY;
case key_access::read32:
return KEY_READ | KEY_WOW64_32KEY;
case key_access::readwrite32:
return KEY_ALL_ACCESS | KEY_WOW64_32KEY;
}
FAIL_FAST();
RESULT_NORETURN_RESULT(0);
Expand Down