Platform Builder: Automatically Flushing the Registry on Changes

Platform Builder: Automatically Flushing the Registry on Changes
Created by samphung on 11/20/2010 10:54:27 PM

Automatically save changes to Windows CE registry  


I have discussed flushing the registry from applications before in Windows CE: Persisting Registry Changes from an Application. It is possible to set up the file system to automatically flush the registry when using hive registry.

The system will automatically flush the registry when the system suspends. Filesys can be configured to flush the registry when changes occur by setting some registry values.

[HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]

     “SpawnThread"=dword:1

    "FlushPriority256"=dword:FF

    "ActivityThreshold"=dword:100

    "FlushPeriod"=dword:3E8

These settings tell filesys to flush the registry when there are 256 changes or when there are any changes with a second. The values are:

·         SpawnThread – causes filesys to start a thread to monitor for registry changes

·         FlushPriority256 – set the thread priority of the thread that monitors for changes. By setting this to a low priority, the thread is less likely to flush the registry if applications are busy which can improve performance at the risk that the registry will not be flushed.

·         ActivityThreashold – sets the number of changes to the registry that will cause the registry to be flushed. If your applications make significant changes often consider setting this to a larger value.

·         FlushPeriod – sets a timeout value that causes the thread to check for any changes to the registry and flush if any changes have occurred

These settings will automatically be added to the registry if the project sets the environment variable PRJ_ENABLE_REGFLUSH_THREAD. I recommend setting these in platform.reg or project.reg instead though so that the values can be controlled and tested.

 

 

 

Note:  This article is written by Bruce Eitman, and is posted to the Embedded101 site with Bruce’s permission.

Copyright © 2010 – Bruce Eitman

http://geekswithblogs.net/BruceEitman/

Embedded101 Articles

Click to Expand/Collapse Groups
Skip Navigation Links.
Collapse Windows Embedded Compact (CE)Windows Embedded Compact (CE)
Collapse Compact 7Compact 7
Collapse CE 6.0CE 6.0
Collapse CE 5.0CE 5.0
Collapse Platform Builder & OS DesignPlatform Builder & OS Design
Collapse BSP, OAL & BootloaderBSP, OAL & Bootloader
Collapse RegistryRegistry
Collapse Device DriverDevice Driver
Collapse File SystemFile System
Collapse Application DevelopmentApplication Development
IBW & ICE
Stream Driver with CEDriverWiz rev 0...
Connecting Visual Studio IDE to CE 6...
Platform Builder: Automatically Flus...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Enhanced BusEnum
Windows CE: Reading a String from th...
Windows CE: Displaying Disk Informa...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Build A Windows Network Projector wi...
Hive-Based Registry for CE 6.0
AutoLaunch for CE 6.0
Hello all
Filter Device Drivers
Asynchronous I/O request support
Configure Flash Storage to Launch Co...
CEDriverWiz Version 2.00 User Manual
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
CEDriverWiz Version 2.00: An Example
CEDriverWiz Version 2.00: Using the ...
Collapse Windows Embedded StandardWindows Embedded Standard
Collapse NET Compact FrameworkNET Compact Framework
Windows Phone 7
Misc.
Turkish porno izle video site in rokettubeporno izle