Registry Fundamentals
A version of this page is also available for
4/8/2010
The structure of the Windows Mobile registry is similar to the registries in other versions of Windows. The registry contains a forest of data subtrees. Each subtree is composed of branches called keys, and each key can contain subkeys and entries. Entries are stored as name-value pairs. At the base of each subtree is the root, which is identified using a well-known constant value, or HKEY.
The following table shows the root constants supported by Windows Mobile and gives a brief description of each.
Root key constant | Description |
---|---|
HKEY_CLASSES_ROOT |
Stores file type matching and OLE configuration data. |
HKEY_CURRENT_USER |
Stores user-specific data for the user who is currently logged in. This root points to the relevant key of HKEY_USERS. Changes made are automatically made in the user's key under HKEY_USERS. |
HKEY_LOCAL_MACHINE |
Stores machine-specific data for device drivers and applications. |
HKEY_USERS |
Stores data for all users including a default user. |
The basic piece of data that is stored in the registry is called a value. A value can be a variety of types, including string or binary. Each value has a name and an associated piece of data.
Registry Operations
Most registry operations require use of registry functions. The Windows Mobile registry exports the Win32 registry functions for applications to call to record and access run-time and other data. Use the registry to store data that your application needs for each session. For example, you can save the state of your application during the shutdown process. Upon startup, your application can reinstate the previous settings.
For more information, see Programmatic Registry Operations.
See Also
Concepts
Registry Keys
Registry Types
Considerations for Registry Use