Including applications in the o/s image, and Bangalore…

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” - - 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


Comments (2)

  1. Rami says:

    Hahaha, as if you were talking to me in this piece. Well, as you know, the Microsleep team is having a problem with the camera software ;). You know, I was thinking of your solution even before I read it. I remebered the WebCam Article so I implemented the same idea with the new application on my eBox. Well, at least I thought I did. Then I read your solution and I was shocked to see that we need to create .CEC. Hahaha. I think life is not thAt good. Oh well. So back to the MSDN website and I found little help, (ok ok, no help) on the creation of the .CEC file to do what I want it to do. I created a file and I did not know how to configure it :(. And the article you referred to is, imm, it remains a huge mystery to me. ISRs and ISTs are great, but for a .CEC?

    One more thing, for the eCAMit, should I only put the .exe file that was already created in the project I received in Release folder? Do we need to put any other files? Btw, eMbedded VC++ is not very user friendly. I was not able to build anything with it. It kept on crashing and I gave up. We need to let the guys at Microsoft know about this. Hahaha, just kidding. Let me also express my gratitude for all the articles you have on the MSDN. Especially the webcam one, and the Developing your First .NET Framework Application for Windows CE .NET.

    Hope you have new ideas and I hope you have a good trip.


    Microsleep Detection Team

    Cal Poly, Pomona

Skip to main content