...Registry API Flavors and New Functions
There are basically three ways to program the registry: the Win32 API functions (advapi32.dll), the more recent Shell Lightweight API (shlwapi.dll), and various object models accessible mostly from Visual Basic® and Windows Script Host....
...The original set of registry functions provides you with the greatest flexibility. It requires you to open a key, to read or write to it, and then close it; the three basic operations for reading or writing an individual entry.
The Shell Lightweight library—also available with Windows 98, Windows 95, and Windows NT 4.0 plus Internet Explorer 5.0 or higher—comes with some new functions that internally open and close the specified key when asked to read or write values. You just call SHGetValue
and let the function deal with the registry. In addition, the new API provides a SHDeleteKey
function that recursively deletes non-empty keys....
...The Windows 2000 SDK introduces three new functions that work with the registry: RegOpenUserClassesRoot, RegOpenCurrentUser,
and RegDisablePredefinedCache. RegOpenUserClassesRoot
returns a handle to HKCR for the specified user...