Windows CE Registry

Windows CE: CeRegGetNotificationInfo() works (sort of) Part 3
I have written a couple of articles about my trials at getting CeRegGetNotificationInfo() to work (see Windows CE: CeRegGetNotificationInfo() Doesn’t Seem to Work and Windows CE: CeRegGetNotificationInfo() Doesn’t Seem to Work Part 2). Well, I have it working and think that I understand its limits now. Special thanks to Luca Calligaris, colleague and fellow MVP for his assistance in figuring this out. My hope is that our work will help others out when they need to monitor for changes to the registry. ......

Posted On Tuesday, August 25, 2009 7:35 PM | Comments (0)

Windows CE: CeRegGetNotificationInfo() Doesn’t Seem to Work Part 2
In Windows CE: CeRegGetNotificationInfo() Doesn’t Seem to Work I discuss my trials at getting CeRegGetNotificationInfo() to work. Several people have followed up with suggestions, which I have tried without any luck. Someone took the time to point out the flaws in my code that I had already pointed out in the first article. That was actually helpful, but didn’t get me anywhere. A colleague of mine did some in depth investigation of the code and found some useful information: · As I had wondered (to ......

Posted On Monday, August 24, 2009 8:36 PM | Comments (0)

Windows CE: CeRegGetNotificationInfo() Doesn’t Seem to Work
I am writing this with a sense of defeat. In my post about monitoring for registry changes (see Windows CE: Monitor for Registry Changes) I showed how to monitor for registry changes using CeFindFirstRegChange() and CeFindNextRegChange() but left the code for determining what changed empty. Honestly, I gave it a shot with the new function CeRegGetNotificationInfo() available in Windows CE 6.0. I simply cannot get it to work, and my searching on the WEB didn’t turn up anything that tells me that it ......

Posted On Monday, August 17, 2009 6:39 PM | Comments (1)

Windows CE: Monitor for Registry Changes
Writing a function to monitor for registry changes is fairly easy in Windows CE. What isn’t easy is to find out what changed, I will cover that in a different article and focus on what does work here. Starting with Windows CE 4.2, Windows CE includes CeFindFirstRegChange(), CeFindNextRegChange() and CeFindCloseRegChange(). These functions can be used to set up an event that will be signaled when changes occur in the registry. Then, your application code uses WaitForSingleObject() or WaitForMultipleObjects() ......

Posted On Monday, August 17, 2009 6:11 PM | Comments (6)

Simple Little Registry Editor - New Release
I have posted a new release of the Simple Little Registry Editor found in Windows CE: Simple Little Registry Editor. This release fixes a problem with writing DWORD values when the most significant bit is set. The application uses RegistryKey.SetValue. There seems to be a problem with how the .NET CompactFramework (and the full framework) handle the second argument during the call which causes an exception. So the following does not work: RegistryKey.SetValue( "TestValue", 0xFFFFFFFF, RegistryValueKind.DWord ......

Posted On Monday, November 19, 2012 12:40 PM | Comments (0)

Windows CE: Setting a lot of Registry Values
If you wanted to dump a lot of values into the registry on a Windows XP system, you could create a reg file and then use RegEdit to import the reg file into the registry. But on a Windows CE device that functionality doesn’t exist. There are some registry editors available for Windows CE that will import a reg file though. Every once in a while I need to do it and don’t have a registry editor to do it for me, so I wrote a little function to write to the registry using an array of data. First I created ......

Posted On Friday, September 18, 2009 6:52 PM | Comments (0)

Platform Builder: Setting the Task Bar to Auto Hide by Default
In the last Microsoft Windows CE chat, someone asked about setting the Explorer Task Bar to auto hide by default. The problem is that the value that controls auto hide is the default value for the key. Default key values are defined in reg files using @=dword:1, which is not supported by Platform Builder’s fmerge. One solution would be to clone the Explorer shell and modify it so that the default value is set to TRUE. But that is a big hammer for a very small nail, isn’t it? Another solution would ......

Posted On Friday, September 18, 2009 6:41 PM | Comments (1)

Windows CE: Using CeRegGetInfo()
Windows CE 5.0 added a function to retrieve information about an open registry key. The function is CeRegGetInfo() which takes a handle to an open registry key, or one of the root keys, and a pointer to a CE_REGISTRY_INFO structure. It returns information about the registry key in the CE_REGISTRY_INFO structure. Before calling CeRegGetInfo() the structure needs to be initialized with its size, a buffer to receive the key name string and pointer to the size of the string buffer. Here is an example ......

Posted On Tuesday, August 25, 2009 10:00 PM | Comments (2)

Windows CE: What is Hive Registry?
Simply put the hive based registry is one of the possible ways to provide for registry persistence in a Windows CE system. Persistence is a term used to mean keep the data even after a power loss or hard reset. The hive based registry saves the changes, or deltas, to the registry in files on a disk. Early Windows CE device tended to lose all of their user data, like the registry changes, when power was removed. Prior to Windows CE 4.0, the registry could be persisted if the device OEM wrote a couple ......

Posted On Tuesday, August 11, 2009 7:53 PM | Comments (7)

Windows CE: Simple Little Registry Editor
The Simple Little Registry Editor can be downloaded from: Download Simple Little Registry Editor I recently decided that it was time to write my own registry editor. I wrote this for my own needs, but am making it available to you. My requirements are simple: 1. Be able to view the registry on a Windows CE device without being attached to another computer, so the Remote Registry Editor won’t work. 2. Need to support multiple CPU families – so this targets the .NET CompactFramework version 2. 3. Be ......

Posted On Monday, July 27, 2009 7:56 PM | Comments (87)

C#: Deleting a Registry Key
I decided last weekend to write my own RegEdit for Windows CE using the .NET CompactFramework. It turned out to be a fun little project, but I ran into a lot of trouble deleting Registry Keys. I used some sample code from a book to get started on this project, which was the root of the problem. The main problem that I ran into was that when I tried to delete a Key, the code raised an UnauthorizedAccessException. Being fairly good at searching for information, I started searching the Internet in general, ......

Posted On Sunday, July 26, 2009 10:39 AM | Comments (0)

Windows CE: Cleaning the Registry Hive
Do you ever need to put a Windows CE system to its factory state? I know that we do. Sometimes it is because the system has been used for testing or burn in. If the system doesn’t have any persistent store, this can easily be handled by resetting the device. But if the system uses the hive based registry on a persistent file system, returning the device to its factory state can be more difficult. The following are ways that I know have been used to erase the hive registry: 1. Reformat the persistent ......

Posted On Tuesday, April 28, 2009 9:47 PM | Comments (4)

Platform Builder: Removing the Recycle Bin from the Desktop
The Recycle Bin seems to be a mystery to a lot of developers, especially when their marketing department insists that they remove the icon from the Windows CE desktop. The first place that most engineers look is the .DAT and .BIB files, which makes perfect sense. It turns out that the Recycle Bin is not a file, but a feature of CEShell.dll and is controlled by the registry. To remove the Recycle Bin add the following to your Platform.reg or Project.reg: [HKEY_LOCAL_MACHINE\Explore... "{000214A1-0000-0000-C000-0... ......

Posted On Thursday, April 2, 2009 9:46 PM | Comments (0)

Platform Builder: Setting the Default Desktop Wallpaper
A close friend with a fuzzy memory asked me to write about setting the default wallpaper for the OS image. After grumbling about a little bit, I thought that it might be a valuable little post. The desktop wallpaper or background image is set in the registry as: [HKEY_CURRENT_USER\ControlP... "wallpaper"=”<\\Windows\... This is set in Common.reg, so you can override it in your Platform.reg or Project.reg. You may also want to look at Summary of Registry Posts Copyright © ......

Posted On Thursday, April 2, 2009 8:47 PM | Comments (2)

Windows CE: Writing to the Registry and Deleting Registry Keys
I needed to update the registry on many devices in the field this week, so I wrote a little application to delete some registry keys and add some new keys and values. The requirements were simple; take a well defined set of registry keys and values and add them to the registry, takes some well defined registry keys and delete them and make it simple for the user. I started by creating a few data structures that I could use to set up some static data to define the registry changes. RegDelete will ......

Posted On Wednesday, March 11, 2009 9:51 PM | Comments (0)

Summary of Registry Posts
Summary of Registry Posts Post of Interest to End Users and Software Engineers Windows CE: Editing the Registry A discussion about the registry editors available for Windows CE devices. Posts of Interest to Platform Builder Users Platform Builder: Automatically Flushing the Registry on Changes A discussion about the configuring filesys to automatically flush the registry when changes occur. Platform Builder: Managing the Registry A discussion about configuring adding and removing registry settings ......

Posted On Wednesday, January 7, 2009 8:38 PM

Platform Builder: Automatically Flushing the Registry on Changes
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\... “SpawnThread"=dword:1 "FlushPriority256"=dword:FF ......

Posted On Thursday, January 1, 2009 10:43 PM | Comments (4)

Windows CE: Save and Restore the Registry
In other posts, I have discussed persistent registry (Windows CE: Persisting Registry Changes from an Application) but what if we want to set the registry back to some known point? There are some functions to save the registry, or parts of the registry, and the restore them later. Save and Restore the Entire Registry The functions RegCopyFile() and RegRestoreFile() can be used to save the registry to a file and then restore the registry with that file later. The following are two very simple applications ......

Posted On Tuesday, December 23, 2008 9:05 PM | Comments (7)

Windows CE: Enumerating the Registry
There are several ways to export the registry from a Windows CE device including the Remote Registry Editor and third-party registry editors. The Remote Registry Editor requires a connection to the device and third-party registry editors typically require a display. I don’t always have a connection to the device or a display so I thought it would be interesting to enumerate the registry to export the registry to the debug port where I can capture it to a file. I set out to figure this out just based ......

Posted On Monday, December 15, 2008 7:32 PM | Comments (0)

Windows CE: Stream Interface Driver Registry Settings
If you have looked at my other posts on stream interface drivers, you have seen that the registry settings that I use for Driver Shell are: [HKEY_LOCAL_MACHINE\Drivers... "Dll"="DriverShell.dll" "Order"=dword:4 "Prefix"="XXX" "DeviceArrayIndex"=dword:1 "IClass"="{A32942B7-920C-48... I thought that I would discuss these a little more, and includes some other settings. Let’s start with the key HKEY_LOCAL_MACHINE\Drivers\... The key HKEY_LOCAL_MACHINE\Drivers\... ......

Posted On Monday, December 8, 2008 9:33 PM | Comments (11)

Windows CE: Remove Suspend from the Start Menu
To remove Suspend from the Explorer shell Start Menu, change the following registry value: [HKEY_LOCAL_MACHINE\Explorer] "Suspend"=dword:1 To: [HKEY_LOCAL_MACHINE\Explorer] "Suspend"=dword:0 You may also want to look at Summary of Registry Posts Tags: REG Files Copyright © 2008 – Bruce Eitman All Rights Reserved ......

Posted On Tuesday, November 25, 2008 5:12 PM | Comments (2)

Platform Builder: Debugging the Boot Hive
One of my engineers was working on a new system today and was having a problem setting up a NAND flash disk. The problem was that while he had made a change to the registry to set up the start address and size of the disk, the changes just were not visible in when the OS ran. We both have a lot of experience developing and building Windows CE systems, so we checked the obvious things: 1. He saved Platform.reg where he made the changes 2. He copied Platform.reg to the _FLATRELEASEDIR 3. When makeimg ......

Posted On Monday, October 13, 2008 10:00 PM | Comments (3)

Windows CE: Programmatically Setting Up an Application to Auto Start
Last week I needed to write an application for my Electrical Engineer to run at boot up to test some hardware changes. He needed to run this test every time the system booted, and needed to have the system reboot often. Of course I don’t expect an EE to be able to set up the test so that it automatically starts when the system boots, and I don’t want to do it for him so I decided to have the application set itself up to run again on the next boot. I have discussed how to set up an application to ......

Posted On Monday, October 13, 2008 9:35 PM | Comments (7)

Platform Builder: Fmerge Tips and Tricks
Platform Builder: Fmerge Tips and Tricks Fmerge is a file merge utility that runs when you run makeimg. Fmerge is used to concatenate and process bib, reg, dat, db and nls files. Each file type is handled in a different way. Tip1, check the makeimg output. The makeimg output includes the fmerge command line for each file type. This can be valuable for understanding which file is included when, and the name of the output file that is created. I will leave it to you to review the command line to check ......

Posted On Friday, June 20, 2008 3:00 PM | Comments (0)

Windows CE: Reading a String from the Registry
I made a change to a string value in the registry recently. That seemed like a harmless thing to do, didn’t it? But, what I did was make the string longer than it was before, again seemed harmless. Harmless until some applications started reading the value into arrays with hard coded length, the problems began. The problem is that RegQueryValueEx() does not have a parameter to indicate the size of the buffer that it will put data into. This means that if the data is bigger than the buffer, RegQueryValueEx() ......

Posted On Wednesday, June 11, 2008 12:48 PM | Comments (5)

Platform Builder: Managing the Registry
The Registry is an important part of Windows CE and allows you to manage many parts of the system's behavior. You have two registry files available to you to use for managing the registry in your system; platform.reg and project.reg. Platform.reg is used to make changes that apply to your BSP, if you are developing a BSP Project.reg is used to make changes that apply to your project You can use these files to add new registry keys and values, you can change existing values and you can delete keys ......

Posted On Wednesday, June 4, 2008 10:42 PM | Comments (9)