Working with ffs partitions, Regmerge.dll, Copyfiles – Motorola VC5090 User Manual
Page 189: Working with ffs partitions -23, Regmerge.dll -23 copyfiles -23
Application Development and Deployment 7 - 23
Working with FFS Partitions
Because the FFS partitions appear as folders under the Windows CE file system, they can be written to and read
like any other folder. For example, an application program can write data to a file located in the Application folder
just as it would to the Windows folder. However, the file in the Application folder is in non-volatile storage and is not
lost on a cold boot (e.g., when power is removed for a long period of time).
Standard tools such as ActiveSync can be used to copy files to and from the FFS partitions. They appear as the
“Application” and “Platform” folders to the ActiveSync explorer. This is useful when installing applications on the
vehicle computer. Applications stored in the Application folder are retained even when the vehicle computer is cold
booted.
There are two device drivers included in the Windows CE image to assist developers in configuring the vehicle
computer following a cold boot: RegMerge and CopyFiles.
RegMerge.dll
RegMerge.dll is a built-in driver that allows registry edits to be made to the Windows CE Registry. Regmerge.dll
runs very early in the boot process and looks for registry files (.reg files) in certain Flash File System folders during
a cold boot. It then merges the registry changes into the system registry located in RAM.
Since the registry is re-created on every cold boot from the default ROM image, the RegMerge driver is necessary
to make registry modifications persistent over cold boots.
RegMerge is configured to look in the root of two specific folders for .reg files in the following order:
\Platform
\Application
Regmerge continues to look for .reg files in these folders until all folders are checked. This allows folders later in
the list to override folders earlier in the list. This way, it is possible to override Registry changes made by the
Platforms partitions folders. Take care when using Regmerge to make Registry changes. The DCP for VC5090w
contains examples of .reg files.
Typically, do not make modifications to registry values for drivers loaded before RegMerge. However, these values
may require modification during software development. Since these early loading drivers read these keys before
RegMerge gets a chance to change them, the vehicle computer must be cold booted. The warm boot does not
re-initialize the registry and the early loading driver reads the new registry values.
Do not use Regmerge to modify built-in driver registry values, or merge the same Registry value to two files in the
same folder, as the results are undefined.
CopyFiles
Windows CE expects certain files to be in the Windows folder, residing in volatile storage. Windows CE maintains
the System Registry in volatile storage. CopyFiles copies files from one folder to another on a cold boot. Files can
be copied from a non-volatile partition (Application or Platform) to the Windows or other volatile partition during a
cold boot. During a cold boot CopyFiles looks for files with a .CPY extension in the root of the Platform and
Application FFS partitions (Platform first and then Application). These files are text files containing the source and
destination for the desired files to be copied separated by “>”. The following example from the file application.cpy is
contained on the demo application partition included in the DCP for VC5090w. It can also be obtained from the
Support Central web site at
.
NOTE
Regmerge only merges the .reg files on cold boots. The merge process is skipped during a warm boot.