Skip to content

WinReg v10.0.0 C++20 Header-only Stable Release

Choose a tag to compare

@GiovanniDicanio GiovanniDicanio released this 14 Oct 18:54
· 17 commits to master since this release
1821e24

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() and TryConnectRegistry(), invoking Close() only after
    the connection is successfully opened.
  • RegTypeToString() now returns a const wchar_t* instead of creating new wstring objects
    every time it's invoked (with potential dynamic memory allocations).
    Moreover, the list of recognized registry types has been extended.
  • SetQwordValue() and TrySetQwordValue() now get the ULONGLONG data parameter by value
    instead of const&.
  • Get rid of the trailing '\r\n' returned by FormatMessage() in RegResult::ErrorMessage().
  • Add _ASSERTE(IsValid()) in places like QueryReflectionKey() 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 InfoKey structure code using member initialization.
  • Simplified code using C++20's std::in_range() instead of custom code in SafeCast.hpp.
  • Improved parsing behavior of double-NUL-terminated strings, including some edge cases.
  • Improved RegKey's methods ContainsSubKey() and TryContainsSubKey().