April 2009 Entries

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)

Windows CE: Opening Driver Registry Key
In the article Windows CE: Stream Interface Driver, XXX_Init() I presented the following function: DWORD XXX_Init(LPCTSTR RegistryPath, DWORD dwBusContect) { HKEY hKey; RETAILMSG( 1, (TEXT("XXX_Init\n"))); hKey = OpenDeviceKey(RegistryPath); if ( !hKey ) { RETAILMSG(1, (TEXT("Failed to open devkeypath,\r\n"))); } else { // Read values from registry if needed RegCloseKey (hKey); } return TRUE; } But I didn’t really discuss the function OpenDeviceKey() and what it is doing. The first parameter, in ......

Posted On Sunday, April 12, 2009 9:54 PM | Comments (6)

Platform Builder: Creating a New Project Design Template for Windows CE 6.0
The Design Template can be downloaded from: Download the Design Template The new Windows Embedded CE 6.0 New Design Wizard is configurable by adding new templates to a catalog file (PBCXML). You may already know that you can add new BSPs to the catalog and these will then be listed in the wizard. You can also add new design templates for selecting the starting OS components. Having a custom design template can be useful to standardize the systems that you develop. At Eurotech, we have a set of Commercial ......

Posted On Saturday, April 11, 2009 11:47 PM | Comments (0)

Platform Builder: Eboot Romimage Errors
When building a bootloader and using makefile.inc to run romimage.exe, error messages and important warning will be directed to the build.log file instead of to the build output. For that matter, all of the romimage output is put in the build.log. For more on building a bootloader see Platform Builder: Building a Bootloader For more on the Platform Builder build system take a look at: Summary of Building Windows CE which lists the articles that I have written about building Windows CE using Platform ......

Posted On Saturday, April 11, 2009 2:27 PM | Comments (0)

Platform Builder: Analyzing Build Result Deltas
After building your project, you find that the results are different from a previous build, or a build on a different computer. That can be disturbing, so you need to understand why the two results are different. The following are some things to look at: 1. First step should be to verify the source code is the same. 2. Check that the same QFEs are installed 3. Check the environment variables Open a build window, enter “set > Environement.txt” or any filename. Then diff the files between two build ......

Posted On Thursday, April 9, 2009 7:57 PM | Comments (1)

Platform Builder: Forcing a Folder to Rebuild Every Time
I was involved in an interesting email discussion yesterday. The email chain started with an odd question. The question was is there a way to force a folder to rebuild every time the folder is built? This was asked by an engineer that I have a lot of respect for, so I am not going to question his madness, if he says he needs it to be build every time then it needs to be built. The discussion was interesting, the solution elegant, but more important my mistake in implementing was a learning experience. ......

Posted On Wednesday, April 8, 2009 9:35 PM | Comments (0)

Platform Builder: Building a Binary Component
Sometimes it is handy to be able to include a binary file, like a DLL, LIB or EXE, in the build tree and have it “built” while the rest of the tree is built. I know you are wondering when you would possibly need to build an already existing file. You might want to do this for a few reasons, like: · You are creating a binary BSP. In this case, the BSP would not include source. · You are creating a source BSP, but you have some third party driver code that you aren’t licensed to deliver with the BSP ......

Posted On Wednesday, April 8, 2009 8:07 PM | Comments (0)

Windows CE: USB Basics
I thought I would spend some time to explain some basic USB terminology. This information might be helpful if you have been assigned the task of writing a USB driver, but don’t have any idea where to start. This will certainly not take the place of better sources like www.usb.org or books like USB Complete: Everything You Need to Develop Custom USB Peripherals by Jan Axelson. What I hope is to quickly give you enough information to hold a conversation about USB. Terminology: Host is the controller ......

Posted On Wednesday, April 8, 2009 1:03 PM | Comments (3)

Platform Builder Available on MSDN Soon
Microsoft announced recently a version of MSDN subscription that will include the Windows Embedded tools. This means that Platform Builder for Windows CE development will be available. This new subscription option will be available July 1, 2009. See Microsoft Announces MSDN Embedded Subscription and Windows Embedded Developer Update for the full details. It doesn’t look like pricing is available yet, but I suspect that it will be less than the cost of multiple version of Platform Builder, but then ......

Posted On Tuesday, April 7, 2009 6:39 PM | Comments (0)

Windows CE: Getting the Device Name
I was looking into getting the device name today and was surprised by what I found. I already knew that the device name was in the registry as: [HKEY_LOCAL_MACHINE\Ident] "Name"="<Some Name>" "Desc"="<Some description of the system>" So it seemed obvious that to get the device name all I needed to do was to read the strings from the registry. I have already covered reading strings from the registry in Windows CE: Reading a String from the Registry so I won’t go into that here. Then I ......

Posted On Tuesday, April 7, 2009 12:39 PM | Comments (0)

Summary of Platform Builder Catalog Posts
Ediiting the Platrorm Builder Catalog Platform Builder 6.0: Creating a Catalog File A gettings started guide to creating a Catalog file for a BSP. Platform Builder: Adding a Binary Component to the Catalog A discussion about adding a binary component to a BSP Catalog including step by step guide. Platform Builder: Creating a New Project Design Template for Windows CE 6.0 A discussion about creating a New Project Design Template to consistently create new projects that suit your needs. Other Catalog ......

Posted On Monday, April 6, 2009 10:35 PM | Comments (1)

Platform Builder: Adding a Binary Component to the Catalog
In Platform Builder 6.0: Creating a Catalog File I discuss creating a catalog file for a BSP. Someone asked me about adding a binary component to the catalog, so let’s look into that. To start with, let’s assume that the binary is a DLL that is in the BSP Files folder, and that the BIB and REG file settings are in Platform.bib and Platform.reg. The BIB and REG file settings look like this: Platform.bib IF BSP_MYBINARYDRIVER MyBinaryDriver.dll $(_FLATRELEASEDIR)\MyBinary... NK K ENDIF Platform.reg ......

Posted On Monday, April 6, 2009 9:13 PM | Comments (5)

Platform Builder: Setting the Default Color Scheme at Boot
Among the questions that I received today, was “How can the default color scheme be changed?” The default color scheme is the one used with the system boots. It turns out that changing the default color scheme in an OS image isn’t very easy to do. A quick look in the registry might suggest that it should be easy. It looks like just changing the following registry setting would be enough to do it: [HKEY_CURRENT_USER\ControlP... "Current"=mui_sz:"<Scheme name>" But when you test ......

Posted On Saturday, April 4, 2009 8:37 PM | Comments (0)

Platform Builder: DB_notify_events DB Files Explained
Disclaimer: I am not going to claim to know much about this, but I ran across some information in my files today and thought I would pass it along. I printed this information in 2001, so it is old, but I suspect still relevant. The point of this disclaimer is: Don’t send me emails or feedback asking me for more information about this. The following explains the fields in a DB_notify_events database entry in the .DB files used by Platform Builder. This information could be useful for setting up an ......

Posted On Friday, April 3, 2009 12:53 PM | Comments (1)

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)

Valter Minute Receives the Microsoft Most Valuable Professional (MVP) Award
Valter Minute received the Microsoft Most Valuable Professional award from Microsoft on April 1, 2009. Valter received this award for his work within the Windows Embedded community, most notably for his work with Windows CE. Valter can be found answering question in the Windows CE Newsgroups. Regulars to this newsgroup might recognize his name from the valuable feedback that he leaves on many of my posts. Valter can also be found speaking at Windows Embedded events in Italy. He also has a blog on ......

Posted On Wednesday, April 1, 2009 7:41 PM | Comments (1)