The registry consists of a hierarchically arranged set of keys. Each key has a name and can have associated subkeys and values. A key represents a branch in the registry hierarchy. A root key is a predefined value that identifies a topmost branch in the registry hierarchy. For example, the HKEY_LOCAL_MACHINE key identifies the branch that contains hardware and software information about the given computer. The keys and values you access are always within a branch of a root key.
To access keys and values in the registry you must open a key. Opening a key creates a handle that you can use to open other keys or to examine and set values. The predefined root keys are always considered to be open.
You can create new keys and new values in any open key. Each value has a corresponding value name and data type. The value name identifies the value and the data type specifies the format of the data, whether a null-terminated string (REG_SZ) or binary data (REG_BINARY). Other values such as REG_DWORD are valid as well, although internally any value that is not REG_SZ is treated as REG_BINARY. Any You can also delete keys and values, but you cannot delete the root keys.