August 2009 Entries

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: 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 Chat Transcript (August 25, 2009)
For those of you who missed the chat today, here is the raw transcript. By raw, I mean that I copied and pasted the discussion without any edits. This is divided into two parts, the top part is the answers from the Microsoft Experts and the bottom part is the discuss (questions) from the audience. Answers from Microsoft: RajeevDu[MS] (Expert): Hi, This is Rajeev Dubey, Bluetooth Program Manager. Sue Loh [MS] (Moderator)[12:02]: Hi, I’m Sue Loh, a developer in the Windows Devices Core team at Microsoft. ......

Posted On Tuesday, August 25, 2009 12:09 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 Chat August 25, 2009
Another great opportunity to ask Microsoft engineers your technical questions is coming up on Tuesday, August 25th. These chats are your opportunity to get advice and answers from the engineers at Microsoft. You may want to review the transcripts from previous chats to get an idea what these chats are all about. Title: Windows CE Live Chat! When: Tuesday, August 25, 2008 9:00 - 10:00 A.M. Pacific Time Add to Calendar Description: Do you have tough technical questions regarding Windows CE or Windows ......

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

Platform Builder: Diff’ing NK.bin Files
In Platform Builder: Debugging the Boot Hive, I talked about opening nk.bin files in Visual Studio with Platform Builder and how this was a good tool for reviewing the registry settings. But, you can also use this technique and diff two nk.bin files. Once you open on nk.bin file, there will be a small icon just below the filename tab. This is shown below in the red circle: When you click on this icon, you will be prompted to open a second nk.bin. Opening the second nk.bin will display the deltas ......

Posted On Monday, August 17, 2009 8:57 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)

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)

Platform Builder: Reverse Engineering an IOCTL Value
A customer contacted me about a debug message that he had. The message was something like: Driver ERROR INVALID IOCTL CODE 0x010303FF He wanted to know what this IOCTL meant and why the driver was called with that value. The following is how I went about answering the question. 1. I opened up my favorite search tool. I have mentioned this before, but it is worth mentioning again, if you are working with Platform Builder it is very important that you have a really good search tool. The search tool ......

Posted On Tuesday, August 11, 2009 11:30 AM | Comments (0)

Platform Builder: Filtering BIB Files Using PostFmergeBIB.bat
Jürgen Welzenbach did a nice job of showing how to filter files from the OS by using PostFmergeBIB.bat (see Discover the Windows Embedded Experience: A flexible way to exclude files from CE image), but I thought that I would take a shot at simplifying what he did. The main reason that I wanted to simplify it is to make it more understandable for those of you that aren’t so familiar with batch files. I also wanted to avoid embedding the tags that he used in the bib files directly. Jürgen created a ......

Posted On Monday, August 10, 2009 9:00 PM | Comments (0)

Windows CE: CeSetPowerOnEvent()
CeSetPowerOnEvent() is an interesting and powerful function when used with Windows CE 4.1 and 4.2, but after that its behavior changes. CeSetPowerOnEvent() was created to allow drivers to set events in their XXX_PowerUp() and XXX_PowerDown() functions. The power functions must not call functions that block or could cause a context switch, which included SetEvent(), so CeSetPowerOnEvent() was created to queue up the events temporarily to be signaled later. Behavior of CeSetPowerOnEvent() in Windows ......

Posted On Sunday, August 9, 2009 9:12 PM | Comments (0)