Compartir a través de


File System Initialization of RAM-based Registry (Windows Embedded CE 6.0)

1/6/2010

The following steps show the OS process of initializing the RAM-based registry:

  1. The OS initializes the kernel.
  2. The kernel runs Filesys.dll.
  3. Filesys.dll initializes the RAM file system.
  4. Filesys.dll initializes the database subsystem.
  5. Filesys.dll initializes the registry by checking for a registry in RAM.
    If Filesys.dll does not find a registry in RAM, it restores the registry from ROM. Filesys.dll loads \Windows\Default.fdf, which was created using Makeimg.exe.
  6. Filesys.dll checks for the ReadRegistryFromOEM OEM adaptation layer (OAL) function. If Filesys.dll does not find ReadRegistryFromOEM, it keeps the registry restored from ROM.
  7. Filesys.dll attempts to restore \Windows\Restore.fdf, which was created with the RegCopyFile function. If Filesys.dll cannot restore \Windows\Restore.fdf, it keeps the registry from ROM, as described in the previous step.
  8. Filesys.dll checks one more time for ReadRegistryFromOEM. If it does not find ReadRegistryFromOEM, it keeps the registry restored from ROM as described in step 5.

Note

Files that exist on a PC card or a device that is serviced by a device driver cannot be accessed during initialization, because Device.exe has not been loaded. Memory cannot be allocated to pass to the OS because saving and loading the registry is implemented in the OAL.

The following procedure shows additional steps that you must take to initialize the RAM-based registry of your OS.

To initialize a RAM-based registry

  1. Expose the ReadRegistryFromOEM and WriteRegistryToOEM functions in the OAL after Filesys.dll initializes the RAM file system.

    For more information about developing an OAL, see How to Develop an OEM Adaptation Layer.

  2. If an OAL is not available, use the RegCopyFile and RegRestoreFile functions to initialize a registry from RAM.

  3. After RegRestoreFile succeeds, reset your device for the new registry settings to take effect.

    Depending on where your registry file resides, using RegCopyFile and RegRestoreFile to initialize a registry from RAM might require certain OS components to be running. For example, if your registry file resides on a PC card, Device.exe must be running before the registry can be restored to enable OS access to the registry file.

  4. To keep the user unaware that a reset is occurring, you can force the display to remain inactive during the startup sequence by configuring the HKEY_LOCAL_MACHINE\Init registry key.

    In this registry key, you can restore the registry and reboot without running Gwes.dll. You can then perform a full boot.

See Also

Reference

RegCopyFile
RegRestoreFile

Concepts

RAM-Based Registry
Persisting Data with the RAM-Based Registry

Other Resources

ReadRegistryFromOEM
WriteRegistryToOEM