I’ve just flown from Seattle to Amsterdam to get a connecting flight to Mumbai, India, then on to Bangalore ready to present at the Windows Embedded Essentials events – Today Amsterdam is very much like Seattle, a little cold and cloudy – it’s just like home… I have two hours on the ground in Amsterdam before the 10 hour flight to Mumbai – I’m on Northwest for the Seattle to Amsterdam and Amsterdam to Mumbai flights, both aircraft are DC-10’s, unfortunately there’s no laptop power (or internet connectivity), perhaps that’s a good thing, I might be able to get some sleep.


A couple of side notes, I’ve been positioned as the Windows Embedded Technical “Expert” for the Windows Embedded Essentials events in Bangalore, so I thought I would start my first session with a preview of a C# managed “Meeting Bingo” for the Pocket PC so that the audience can keep track of any marketing words or phrases used by people like Dilip Mistry the Director of Developer Evangelism in India, or Ashim Jaidka who's giving the keynote – the application shows a list of your favorite marketing or sales terms (rich, scalable, leverage etc…), as the current speaker uses one of the words or phrases you simply click on the word/phrase – when all words/phrases have been ticked off you then have “Bingo!” – if you’re interested in getting the code for this application let me know – since this is a managed application the same application binary also runs on Windows XP without any changes to the code, very cool!


I have a Pocket PC Phone Edition with me on this trip, when I stepped off the aircraft in Amsterdam I switched “flight mode” off (which turns the radio on [go figure]), within a couple of seconds I had signal strength and a GPRS connection, cool, e-mail was sync’d within a couple of minutes – this gives me something to read in the KLM business lounge.


One of the e-mails was from a member of one of the Windows ChallengE teams, they’ve been working hard on getting their operating system image and applications ready for next weekends competition and are ready to integrate their applications into the Windows CE o/s image – but how to do this seemingly simple task? – Let’s assume the application is a Windows CE MFC application, the reason for picking an MFC application is that you can’t create/build an MFC application directly in the Platform Builder development tool – you would use eMbedded Visual C++ to create the application, and test the application on the embedded operating system – once finished you might want to put the application into the final o/s image – but how?


There are a couple of ways to do this…


Hack and Slash… - Let’s assume that I’ve created a platform called “MyPlatform” for the Emulator – the workspace will be in C:\WINCE420\PUBLIC\MyPlatform – there’s an interesting folder here - C:\WINCE420\PUBLIC\MyPlatform\WINCE420\Emulator\oak\files, any file you drop into this folder will be copied to your _FLATRELEASEDIR (build release folder) – that’s the first step, the second part to this is to update the project.BIB (Binary Image Builder) file to include the application in the o/ s image, the Project.bib file is in the same folder, or could be updated from Platform Builder (Parameter View) – open the Project.BIB file, there are two parts to the BIB file, MODULES, and FILES – Modules are executable components, (applications and DLL’s) with one exception, managed applications, even though a C# or VB .NET application is based on the PE format you need to put this into the files section rather than the modules section. Take a look at the example below… this adds the application Foo.exe to the o/s image – since this is an MFC application we would also need to include the MFC runtime DLL’s in the image, this is in the catalog, so you could just add it directly.



;  Name            Path                                Memory Type

;  --------------  ----------------------------------  -----------

Foo.exe            $(_FLATRELEASEDIR)\Foo.exe          NK  SH


The second option is to create a .CEC file to wrap up the application – take a look at this article from MSDN “Get Embedded” - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnembedded/html/embedded01202004.asp - this article discusses your first .NET Compact Framework application - .NET applications require a number of core components from the o/s, in this case, we’re writing an MFC application, so we could add the MFC runtime as a dependency in the .CEC file, and also have a #Custom step to copy the application to the _FLATRELEASEDIR, and include a BIB record – you should be all set.


- Mike