I recently bought a new PC and I choosed a machine based on the 64bit version of Windows 7.
Using a 64bits OS will allow me to use more than 4GB of RAM and this is quite important for me because it will allow me to run multiple virtual machines to test beta products and keep some customers' development environment isolated from the others (for example for customers that need to test and certify each installed QFE and may allow me to install them on my development machine some time after their availability).
On the other side running VS2005 and the Windows CE tools on the "main OS" istead of running them inside the virtual machine will provide better performances and avoid some of the issues of virtualization (limited or wasted disk space, issue with some devices, like USB devices etc.), so I decided to install the tools on Win7-64bit as my main working environment and leave virtual machine for specific configurations.
This is an unsupported scenario for Windows CE development tools, so I'm not suggesting that you should upgrade your OS to 64bit if you are happy with your current 32bit setup.
In this post I'll try to report all the issues that I found with my setup and, hopefully, provide solutions (and maybe workarounds) to make Windows CE development possible on 64-bit machines.
1. Setup
As usual the first problems may happen during the tools installation.
First of all if you have newer releases of Visual Studio currently installed on your development machine you should unistall them and re-install them after you have set-upped VS2005 and Windows CE Plaform Builder.
You should run all the setup application as an Administrator, so you should give administrator rights to your current user (you may need to do that also to run VS2005) or, at least, right click on the setup executable and choose "Run as administrator".
The first issue I found is an error (2738) when the setup tries to run some vbscript code to complete the installation.
To fix this issue you should execute your command prompt as administrator (right click on cmd.exe or use this "trick" to create an administrative command prompt shortcut on your desktop or start menu) and re-register the vbscript runtime.
First of all, remove current registration information:
reg delete "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f
Then register the 64-bit version of vbscript.dll:
regsvr32 C:\Windows\SysWOW64\vbscript.dll
(the actual path of the DLL may vary if you have chosen a different path for the Windows folder)
Now you can run (as administrator!) the required installations:
- Visual Studio 2005
- Visual Studio 2005 service pack 1
- Visual Studio 2005 patch for Vista
- Windows CE setup
- Windows CE R2 setup
- Windows CE R3 setup
Then I suggest to try to build a simple OSDesign to check that all the components of the Windows CE build system are working correcly.
2. Installing QFEs
On my machine to install QFEs I needed to register again the vbscript runtime. I restarted my PC after VS2005/Windows CE installation and also installed some Windows updates, so you may not need to do that if you install the QFEs immediately after the setup of the main OS.
To speed-up QFEs setup I usually write a .bat file that install them in sequence using msiexec. Here's the code of a sample batch file that installs QFEs for ARM and x86 from march to june:
f:
cd F:\Download\WinCE\QFEs\WINCE600
reg delete "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f
regsvr32 c:\windows\syswow64\vbscript.dll
regsvr32 c:\windows\syswow64\jscript.dll
start /wait WinCEPB60-100331-2010M03-Armv4I.msi
start /wait WinCEPB60-100331-2010M03-X86.msi
start /wait WinCEPB60-100430-2010M04-Armv4I.msi
start /wait WinCEPB60-100430-2010M04-X86.msi
start /wait WinCEPB60-100630-2010M06-Armv4I.msi
start /wait WinCEPB60-100630-2010M06-X86.msi
You may also use the /quiet or /passive command line switch to perform non-interactive setup of all the QFEs, but I suggest to keep the setup interactive the first time you install QFEs on a new machine to ensure that you'll be notified about any setup issue.
You can create your batch file by running:
dir /on /b > mybatch.bat
Inside your Windows CE QFEs directory.
3. Security
Some of the VS2005/Windows CE components may require network access to work. If you have the Windows Firewall enabled you will be prompted with the following authorization dialog:
This will happen also on 32bit machine.
4. RNDIS
Some devices use a USB connection for downloading and debugging of the OS image on the target. Some of them use RNDIS to emulate a network connection over USB and require a driver to operate.
This driver is part of the Windows7 install, but you need to tell to the system where it can find it.
As soon as your device is detected the OS will try to automatically find a driver for it, but fails:

Now you can go to the computer management console (right click on "my computer" and choose "manage"), and open device manager:
The RNDIS kitl device is marked with an exclamation mark to point out that its driver is not running.
Right click on it and choose "update driver", you'll be prompted with the driver selection wizard.
On the first step:
select "Browse my computer for driver software" and you will be prompted with the driver selection dialog:
Choose "Let me pick from a list of device drivers on my computer" and you'll see the device category list:
Select "Network adapters" (RNDIS emulates a network connection) , and then "Microsoft Corporation" (don't ask me about the differences between "Microsoft" and "Microsoft Corporation" here!):
Now you should select: "Remote NDIS compatible device":

Now your new KITL device is up and running and you’ll be able to download your OS images to it as you do with devices with a “regular” ethernet connection to your PC.

If you need to connect to a RNDIS device from a virtual machine is usually easier to set-up the RNDIS driver on your "real" machine and then share it with the virtual machine as you do with other network connections.
If you are running Windows CE development tools on a 64bit machine and found other issues that I did not cover in this entry (and did not experience!) and want to share some tips-and-tricks with other developers, write a comment here and I'll be happy to update this entry, giving you credit for the tip, of course.
5. Generate an SDK
Usually after you’ve built and tested your OS image you need to generate an SDK to provide to application developers all the libraries, include files and documentation they need to develop applications targeted to your specific device.
The SDK configuration wizard works with no issues on my 64bit machine, but the build SDK command generated an error:
'C:\Program' Files (x86)\Microsoft Visual Studio 8\Common7\IDE>"C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\GenSdk.exe" "C:\WINCE600\OSDesigns\S4WE\S4WE\SDKs\SDK1\obj\BuildSDK1.xml"
Required files may be missing. To resolve the issue, reinstall Platform Builder.
This happens because GENSDK.EXE (the tool that “packs” all the files required for your SDK in a MSI file that you can redistribute and install on developer’s machines) is a .NET application that is spawned from PB and runs in 64bit mode. 64bit mode has its own registry and the configuration keys generated by PB setup are only in the 32bit registry. That generates the problem.
To fix it we can just develop a small .NET application, force it to run as 32bit (x86) and reference GENSDK.EXE as an external assembly, invoking its main method from our new 32bit app. This will force GenSdk to run as a 32bit app, finding all the registry information it needs to complete the SDK build.
To create this new project select “File\New Project…” from the VS2005 menu.
The new project wizard appears:

Select Visual C#\Windows as project type and “Console Application” as template. I called my “wrapper” GenSDK32.
Chose “OK” and you are ready to develop your GenSDK wrapper application.
The first step is to add a reference to the “real” GenSDK application. Right click on the “references” entry in your project inside Solution exporer:
The Add Reference dialog appears:
Select the “Browse” tab and navigate to the directory where gensdk.exe is located (usually “C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS”), select GenSdk.exe and press “OK”.
Now a reference to GenSdk assembly has been added to your project.
If you double click on it you’ll be able to discover the object and namespace that it implements:
as you can see it implements just one object (the main application class), that implement method Main.
Let’s see how we can call it from your code.
This is the code that the wizard generated for our application:
using System;
using System.Collections.Generic;
using System.Text;
namespace GenSdk32
{
class Program
{
static void Main(string[] args)
{
}
}
}
To call the Main method of GenSDK we need to add just one line, inside our own Main method:
static void Main(string[] args)
{
Microsoft.PlatformBuilder.Sdk.SdkGenerator.GenSdk.Main(args);
}
Before we can build our application we need to configure it as 32bit only. We can do that by double clicking on the “Properties” node in Solution Explorer, this will bring up the project properties page:
Select the “Build” tab, choose “Release” as active configuration, and “x86” as Platform Target for your application.
Now you are ready to build it by choosing “build\build solution” from the VS2005 menu.
Now you can copy gensdk32.exe to the same directory where gensdk is installed.
To build our SDK we have to run gensdk32 from the PB command line. Go back to your OSDesign and choose “Build\Open release directory”.
Now you can copy and paste the command line of the previous failed gensdk.exe execution and replace it with gensdk32.exe:
"C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\GenSdk32.exe" "C:\WINCE600\OSDesigns\S4WE\S4WE\SDKs\SDK1\obj\BuildSDK1.xml"
And your SDK will be built!
If you are too lazy to build your own gensdk32 project, you can download mine from here:
I borrow this quotation from Douglas Adams to thank Fortech for the last great 15 years of working experience.
I started by writing ms-dos applications, moved to Windows 3.1, Windows 95 and almost all the embedded and non embedded "Windows something" operating systems.
Here I learnt the difference between being able to write some code and being able to write a piece of Software that is reliable and usable.
Now I decided to begin a new experience as a self-employed "Embedded Software Craftsman" and I would like to thank Fortech for the great time and experience I was allowed to share with many great colleagues that I still consider among my best friends.
So long, and thanks for all the fish!
My first son Lorenzo is born on the 14th of July 2010 (something revolutionary about this date?).
If my blog updates and forum posts will be reduced or will have very strange (and late!) timestamps, now you know why.
A new blog dedicated to Silverlight for Windows Embedded has been opened by the development team. Add it to your RSS feeds if you are interested in this technology and in developing easily dynamic and visually pleasing UIs for your embedded devices.
Here’s the link:
http://blogs.msdn.com/b/silverlightforwindowsembedded/
I’m also very happy to announce that Vinoth Rayagopalan has been awarded as a Windows Embedded MVP. Vinoth is very active on the Windows Embedded forums and newsgroups and I’m very happy to see that his passion and will to share his knowledge helping other developers has been recognized with this award.
Fellow MVP Jochen Dieckfoß has posted a tutorial about Silverlight for Windows Embedded development using the new tools included in the Windows Embedded Compact 7 CTP on his blog “Discover the Windows Embedded Experience”:
http://discovertheexperience.blogspot.com/2010/06/windows-embedded-compact-7-silverlight.html
This tutorial is very useful also because it allows you to compare the differences between the current version and the new one and, more specifically, allows you to appreciate how the new tools are integrated inside Expression Blend and Visual Studio to make Silverlight for Windows Embedded applications easier.
Don’t forget to add Jochen’s blog to your RSS feeds!
Yesterday I did a presentation about Windows CE at the University of Padua
Even if the picture seems to suggest that I just showed and empty slide, I illustrated the new features of the OS and did a quick demo of Silverlight for Windows Embedded on Windows Embedded Compact 7 (I’ve to get used to this new name), showing the new tools that provide a better integration between Expression Blend and Visual Studio for the development of Silverlight applications (I hope to be able to write more on this topic soon!).
The Operating System was running on some real hardware (TI OMAP3530 evaluation board) and many people had a chance to interact with the new customizable shell.
Most of the 60 people attending were still awake at the end of the one hour and a half session, and some of them even asked questions!
I would like to thank all the people attending and all the people of Arrow, Fortech Embedded Labs and the University of Padua that made this event possible and provide me the tool and the time to do this presentation.
_thumb.jpg)
This will be the official name of the new release of Windows CE.
Windows Embedded Compact 7 is available as a public CTP and it already supports a wide range of CPUs and both the device emulator and VirtualPC emulated environments.
So I’ll have to learn a new (and longer) name for my favorite OS… but I (and all my two readers!) will be able to test it as soon as the download from connect web site completes (I'm sorry for my readers, but you'll have to download it by yourselves).
Here’s a link for the download (it's free but you’ll have to register on connect with a valid LiveId):
https://connect.microsoft.com/windowsembeddedce
Remember that this is still a beta (or “Community Technology Preview” if you speak marketing language) and so it’s better to not install it on your main development PC (or, at least, backup everything before installation) and that the features and performances you’ll get from this beta may not be the same ones of the final release of the OS.
You can discover the new features of Windows Embedded Compact on the new “official” webpage on microsoft website:
http://www.microsoft.com/windowsembedded/en-us/products/windowsce/compact7.mspx
or on Olivier’s blog:
http://blogs.msdn.com/b/obloch/archive/2010/06/01/windows-embedded-compact-7-announced-and-public-ctp-available.aspx
I hope to be able to post some interesting content about Windows Embedded Compact 7 soon (and maybe be able to shorten it’s name in CE7 in my blog posts, when I'll ensure that both my readers are not worketing for Microsoft's marketing department …).
As you may already know, microsoft is moving its communities to a new platform, based on web forums. The “old” USENET newsgroups are going to be replaced by web forums organized by categories. One for low-level platform development (for the guys working with Platform Builder), another one for native application development (for people writing their real-time applications in C/C++ or people using Silverlight for Windows Embedded) and, last but not least, a forum dedicated to managed application development (for people that are quickly developing their applications with the .NET Compact Framework).
You can find the new forums here:
http://social.msdn.microsoft.com/Forums/en-US/category/windowsembeddedcompact
Read the “welcome” message to choose the best forum for your question and never forget that to have a good answer you should ask your question in a good way.
Here you can find some suggestions about how you can ask questions (in newsgroup or forums):
http://guruce.com/blogpost/howtoaskquestionsonnewsgroups
(Thanks to Michel Verhagen for the article)
If you have a good idea for a cool embedded device based on Windows Embedded 7 and some free time to work on it you can partecipate to the Embedded Spark 2010 Summer Challenge.
Just submit a short paper describing your idea and, if your idea is one of the 75 selected by the judges, you’ll receive some hardware to put your idea in practice and a chance to attend ESC Boston for free and win 15.000 dollars.
The latest challenge has been won by Marco Bodoira, a fellow Italian embedded developer, so I hope to see many Italian developers (and non developers) presenting their ideas and project for this new challenge!
You can find rules, ideas, forums and all the information you need at the challenge web site:
http://www.embeddedspark.com/
Martedì 8 Giugno, presso l’università di Padova terrò un intervento su Windows CE all’interno dell’evento: “Workshop sulle nuove architetture per sistemi embedded”.
All’interno dello stesso evento altre sessioni tratteranno dell’architettura ARM e in particolare dei nuovi core Cortex A8, di applicazioni avanzate e di Linux Embedded.
L’agenda (fitta e interessante) e il link per le iscrizioni potete trovarli qui:
http://www.arrowitaly.it/training-events/training-events/dettaglio-training/article/workshop-sulle-nuove-architetture-per-sistemi-embedded/?tx_ttnews[backPid]=1336&cHash=ae34e269e1