이것저것/Windows CE

Registry

우담바라 2007. 3. 20. 16:59
Platform Builder for Microsoft Windows CE 5.0
Registry

The Windows CE registry stores data about applications, drivers, user preferences, and other configuration settings. The registry is organized in a hierarchical system of keys and values. A key is similar to a directory and can contain values and other keys. Windows CE supports four root keys. The following table shows the four root keys that Windows CE supports, and what type of data you should store under those keys.

Key name Contains
HKEY_LOCAL_MACHINE Hardware and driver configuration data
HKEY_CURRENT_USER User configuration data
HKEY_CLASSES_ROOT OLE and file-type matching configuration data
HKEY_USERS Stores data that applies to all users

A value is the basic piece of data that is stored in the registry, and it can be a variety of types, including string or binary. Each value has a name and an associated piece of data. For example, a device that is running the Windows CE Handheld PC, Professional Edition, software uses Wrap to Window in the HKEY_LOCAL_MACHINE\Software\Microsoft\Pocket Word\Settings key to store an integer value.

The following table shows the different limits in the registry.

Limit Description
Key or value name length 255 characters
Data size 4 KB
Key hierarchy depth Up to 16 nested subkeys

When programming with the registry, try to keep name and data size small. Note that registry values in Windows CE take up less memory than registry keys. Design your registry hierarchy to use as few keys as possible.

The Windows CE 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. The registry is also used for system initialization and is always present in RAM. Effective with version 2.10, the registry can be loaded from and stored to another persistent storage device. As of Windows CE .NET 4.0, a registry option exists to allow the registry to exist as a file on any file system.

Note   Windows CE provides the option to implement the registry as a RAM-based heap file. If the RAM loses power, the registry data can be lost if the OEM has not implemented a registry backup procedure. Windows CE then must reload the initial registry from ROM.

'이것저것 > Windows CE' 카테고리의 다른 글

SOUCES 파일에서 사용되는 Macro  (0) 2007.04.04
Configuration files  (0) 2007.04.04
Windows CE Build 단계  (0) 2007.04.04
[WinCE] Buetooth Dongle Test  (0) 2007.03.26
WinCE 5.0 Parameter  (0) 2007.03.09