July 2009 Entries

Windows CE: Outputting Copyrts.txt to the Debug Port
Windows CE: Outputting Copyrts.txt to the Debug Port Someone asked on the newsgroups recently about reading copyrts.txt from an application. This is really a simple task to do, but I decided to output the file to the debug port, which turned out to be way more interesting. The code below works to read the file into a buffer that is allocated to be the size of the file, so it reads the entire file in one call to ReadFile(). Of course to keep this simple, I left out any and all error handling – which ......

Posted On Friday, July 31, 2009 12:05 PM | Comments (2)

Windows CE: Event Data
Earlier I wrote about using Events in Windows CE (see Windows CE: Synchronization Objects – Events and Windows CE: Event Test Code) but I didn’t discuss event data. Events can have data associated with them so that one thread can pass a small piece of data to another thread. This is accomplished by calling SetEventData() and GetEventData(). The data is a DWORD, although that means that it can be a pointer to data. Of course the pointer only works if both threads are in the same process, but either ......

Posted On Friday, July 31, 2009 11:42 AM | Comments (1)

Windows CE: fatal error LNK1112:
I have seen questions about the Visual Studio error “fatal error LNK1112: module machine type 'THUMB' conflicts with target machine type 'ARM'” quite a bit lately. Tonight it happened to me. I was working on a project that I had targeded against the PocketPC 2003 SDK. Then I added a new SDK, in this case a Windows CE 5.0 ARMV4I SDK, to the project and had it copy settings from the PocketPC 2003 settings. Unfortunatly, not copying the settings makes things worse. Adding the SDK looks like: The problem ......

Posted On Thursday, July 30, 2009 9:32 PM | Comments (1)

Windows CE: Event Test Code
Yesterday, I wrote about Windows CE Events in Windows CE: Synchronization Objects – Events. Today I thought I would write some sample code to demonstrate the behavior differences between event types (manual and auto reset) and the functions for signaling the event (PulseEvent() and SetEvent()). I started by defining some macros to make the code easier to read. The call to CreateEvent() takes some parameters that are simply TRUE or FALSE. When you are writing the code and reviewing the documentation ......

Posted On Wednesday, July 29, 2009 9:30 PM | Comments (2)

Windows Embedded Standard (WES): Remote Debugging using MSVSMON.exe
Debugging an application remotely on a WES system running WES requires a little setup. The following presents steps for setting up the remote system and the application environment for remote debugging using MSVSMON.exe. 1. Have your system administrator do one of the following on the WES system: a. Add the WES system to the domain give the system a name, in this case use WES-DEVICE. You will need to log onto the WES system using your domain username and password. b. Add an account on the WES system ......

Posted On Tuesday, July 28, 2009 9:23 PM | Comments (3)

Windows CE: Synchronization Objects – Events
Events are one of the synchronization objects provided by the Windows CE kernel. Events are used to allow one thread to signal one or more threads that something happened. Examples: · Events are used by the kernel and drivers to handle system interrupts. When an interrupt occurs the kernel signals the driver by setting an event that the driver waits for. · Events are sometimes used to signal driver or services that registry settings have been changed by an application or Control Panel Applet. The ......

Posted On Tuesday, July 28, 2009 9:16 PM | Comments (10)

Short Notice - Windows CE Chat Today July 28, 2009
Another great opportunity to ask Microsoft engineers your technical questions is coming up on Tuesday, June 30th. 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, July 28, 2008 9:00 - 10:00 A.M. Pacific time Add to Calendar Description: Do you have tough technical questions regarding Windows CE or Windows Mobile ......

Posted On Tuesday, July 28, 2009 8:37 AM | Comments (0)

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)

Platform Builder: Creating a CEPC Splash Screen
The CEPC BIOSLoader is capable of displaying a splash screen while it loads the OS. The splash screen is a picture that you can create. The picture is a Windows bitmap file with a .BMP file extension, or a compressed Windows BMP file with a .BMX extension. The compressed Windows bitmap file is created by first creating the BMP file and then running bincompress to create the BMP file. I don’t know the advantages of using a BMX vs BMP file for the splash screen. BIOSLoader loads the splash screen based ......

Posted On Sunday, July 12, 2009 6:38 PM | Comments (2)

Platform Builder: Setting up a USB Key to Run BIOSLoader
Platform Builder Help provides instructions for setting up a floppy disk to boot using BIOSLoader. Really a floppy disk? Who uses a floppy disk anymore? Many of us need to boot from more modern storage devices, especially devices that are readily available for purchase. This article will focus on USB mass storage devices, also known as USB Keys or USB Sticks. For those of you who have been working with x86 Wintel boxes for years, setting up a boot device is probably simple. But, many of us are just ......

Posted On Sunday, July 12, 2009 3:29 PM | Comments (9)

Windows CE: Control Panel Code
The source code can be downloaded: Download Source Code In Windows CE: Creating a Control Panel Applet, I wrote about creating a Control Panel Applet that displays OEM versions including the OEM Build Number, Bootloader Version and a CPLD version. In this article, I will discuss the code that makes that Applet run. It might be good to first discuss a little about Control Panel applets and what make them unique. The following are some facts about Control Panel Applets: · Control Panel Applets are ......

Posted On Tuesday, July 7, 2009 8:41 PM | Comments (1)

Windows CE: Creating a Control Panel Applet
A reader asked me this week if I had any documentation about creating a control panel application. This topic has been on my list for a year, so I maybe it is time to write about it. I only write code from a clean sheet of paper when I can’t find a good starting point. Luckily for me, this is a case where I can find a good starting point. I am going to start with one of the sample control panel applets available in the shared source code that comes with Platform Builder. I am also going to build ......

Posted On Monday, July 6, 2009 12:18 PM | Comments (6)