Search code examples
windows-ce

Simple example to implement hive based registry?


Simple example to implement hive based registry? I have an appliaction in which i should maintain the value of volume up and down, everytime when i start or turn off the application, for this i came across hive based registry. But dont know how to implement and how to use?

Please Reply Thanks in advance


Solution

  • You can start by reading this post: http://geekswithblogs.net/BruceEitman/archive/2009/08/11/windows-ce-what-is-hive-registry.aspx and then read the MSDN article on setting the Hive Based Registry.

    Don't change public code though, just make the changes in your platform.reg and they will take affect over the common.reg file.

    Basically, you will need to encapsulate all the registry settings that are a must for boot time in you ; HIVE BOOT SECTION + ; END HIVE BOOT SECTION(don't mistake this for an ordinary reg file comment - it is a flag for the build system).

    Take a look at the BSP of MAINSTONEIII, it should have it implemented at WINCE600\PLATFORM\MAINSTONEIII\FILES.


    Your other option for your requirement is to keep a configuration file on a persistent storage - seems to me like a more trivial solution and more adequate in case you only want persistent registry for the volume setting.