MSDN contains all you need to know about accessing the registry.
Start here: http://msdn.microsoft.com/library/de..._registry.asp.
The topic begins with an overview of what the registry is.
The subsections go on to describe all the functions that can be used to manipulate the registry (e.g. searching, reading, writing etc), the parameters the functions take, and how to use the functions together to build an application. Absolutely everything you need to know is here and in C++ syntax. If you are using Microsoft Visual C++ 6 then the MSDN Library CD also contains these same topics in the Platform SDK section.