Repository navigation
WinReg v10.0.0 C++20 Header-only Stable Release
·
17 commits
to master
since this release
Lots of improvements in this C++20 release (so I bumped the version number and skipped v9)!
Improvements in v10.0.0
- Fixed wrong positions of
[[nodiscard]]in some places
(see e.g. https://giodicanio.com/2026/10/12/where-to-put-nodiscard-a-silent-trap-with-msvc/). - Furtherly simplified comparison code using new C++20 features.
- Fixed
ConnectRegistry()andTryConnectRegistry(), invokingClose()only after
the connection is successfully opened. RegTypeToString()now returns aconst wchar_t*instead of creating newwstringobjects
every time it's invoked (with potential dynamic memory allocations).
Moreover, the list of recognized registry types has been extended.SetQwordValue()andTrySetQwordValue()now get theULONGLONGdata parameter by value
instead ofconst&.- Get rid of the trailing
'\r\n'returned byFormatMessage()inRegResult::ErrorMessage(). - Add
_ASSERTE(IsValid())in places likeQueryReflectionKey()and similar reflection methods
where it was missing. - Added a safety check in
ScopedLocalFree::AddressOf()to free any allocated memory
before returning write access to the pointer member. - Simplified the
InfoKeystructure code using member initialization. - Simplified code using C++20's
std::in_range()instead of custom code inSafeCast.hpp. - Improved parsing behavior of double-NUL-terminated strings, including some edge cases.
- Improved
RegKey's methodsContainsSubKey()andTryContainsSubKey().