The persistent storage that Windows CE makes available to applications is called the object store. This is the part of memory that is not used for the operating system.
The object store is used for the following purposes:
The registry is a hierarchical database in which Windows CE stores information necessary to configure the operating system. It contains information on user profiles, applications, hardware, ports in use, and so on. The registry replaces most of the text-based initialization (.ini) files used in MS-DOS and Windows 3.x configuration files, such as AUTOEXEC.BAT and CONFIG.SYS.
Specific registry locations are described in various chapters of the Windows CE Programmer's Guide. An example of a registry location used for synchronization is HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Services\ Services\Synchronization\Objects.
Windows CE supports a subset of the Win32 registry functions. The differences between the Windows CE functions and their Win32 counterparts are minimal. The main difference is that Windows CE assigns a default security descriptor to keys, so the parameter for security attributes in RegCreateKeyEx should be set to NULL. For a list of the supported functions, see Lists of Functions and Interfaces.
The file system functions available to Windows CE-based applications are those supported by the Windows CE kernel. Note that the C Runtime library does not include any file access functions, such as fopen, fread, and fprintf. The following discussion highlights specific points concerning the Windows CE file system functions. For a list of the file system functions, see Lists of Functions and Interfaces.
CreateFile opens existing files as well as creates new files. Windows CE does not support simultaneous read/write operations; thus, files cannot be created with the overlapped attribute set. To write to a file in the equivalent of append mode, call CreateFile and SetFilePointer. To overwrite the contents of a file, call CreateFile and SetEndOfFile. ReadFile does not support asynchronous reads nor does it support reads through a socket. WriteFile does not support asynchronous writes, and, unlike MS-DOS, Windows CE interprets zero bytes as a null write. To truncate or extend files, use SetEndOfFile.
A ROM file is a file stored on a device as read-only memory, for example, flash memory or PC Cards. A ROM file is an option for dealing with the memory limitations of a Windows CE-based platform. The GetFileAttributes function has additional return values for files stored in ROM. The FILE_ATTRIBUTE_INROM value identifies the file as read-only. The FILE_ATTRIBUTE_ROMMODULE value indicates that the file is designed to be executed in place, without first being copied to RAM. The CreateFile function cannot be used to access this type of file; the LoadLibrary and CreateProcess functions must be used instead.
The rest of this chapter discusses Windows CE databases and the functions which relate to them. For a list of the Windows CE database functions, see Lists of Functions and Interfaces.