Windows Registry programming using the native C API is cumbersome and bug-prone. Fortunately, you can simplify that using a modern C++ library like WinReg.
by Giovanni Dicanio
From the blog post:
WinReg is a modern C++ library that exposes a high-level public interface to simplify the access to the Windows Registry.