Development for .Net Compact Framework and Windows CE 6.0

Amyuni's Development Team would like to share with fellow developers general information about Windows and Web development. These are issues encountered by Amyuni's team and were either solved or pending solution.
Post Reply
Devteam
Posts: 119
Joined: Fri Oct 14 2005
Location: Montreal
Contact:

Development for .Net Compact Framework and Windows CE 6.0

Post by Devteam »

Written by Yoisel Melis Santana, Senior Developer at Amyuni.

Starting a new project using Windows CE 6.0 can be a frustrating experience at the beginning, even more if you consider that somehow you already have some programming skills in .Net Compact Framework with Windows Mobile. In this post I will try to make the starting process a little bit easier.

Windows CE vs Windows Mobile
First thing to know is that Windows Mobile and Windows CE are not the same operating system. We could say that they share the same core, but applications designed for one of them will not necessarily run on the other, even if we use a pseudo-multiplatform technology such as .Net Compact Framework.

Windows Mobile is an operating system designed by Microsoft for Pocket PC and Cellular Phone devices. The hardware support is restricted and in order to distribute it a company will need to purchase several thousands licenses, so we can say it is designed for “large scale” device manufacturers.

Even when Windows Mobile uses the same core as Windows CE, it also includes a wide range of services, applications (ex: Pocket Outlook, Pocket Internet Explorer), and expansions to some functionalities of Windows CE (ex: Pocket Outlook Model) that we will find reduced on Windows CE, or we will not find at all (ex: “Today screen”, Viewers for Microsoft documents and PDF). Additionally, Windows Mobile also provides a different Shell that we will not find on any Windows CE distribution.

We can consider Windows CE as a family of operating systems, derived from one common product. Having the required hardware and software resources, we could build our own “version” of Windows CE using the product Windows Embedded CE 6.0 from Microsoft, formerly called Platform Builder (I do prefer the old name, it sounds clearer to my, but that’s just my opinion.)

Using Platform Builder we can design operating systems for several types of devices: multimedia players, e-book readers, industrial controllers, even small servers for specific purposes.

Platform Builder integrates to Visual Studio 2005 (yes, sorry, but it will not work on VS 2008 or your brand new VS 2010), and using several wizards we can configure the functionalities we want to include in our operating system and generate an image of it. Later on this image can be installed on the real device it was designed for. Additionally, we can generate an SDK that other programmers (or ourselves) could use to develop new applications for this device. This SDK is mainly meant to be used with C++.

Platform Builder can be used for free for an evaluation period of 6 months. It can be downloaded and installed directly from the Microsoft website (around 4 Gb). Microsoft will not require you to pay for any license until you really start the distribution of the new devices. And there is not a limit on how many licenses you have to purchase.

When we need to develop applications for Windows CE, there are several scenarios we might face. We may have to develop a project including the complete design of a new device and its operating system, or we may have to develop applications for a device already designed. We will concentrate on this second scenario for the rest of this document.

Where is the Windows CE Emulator for Visual Studio 2005 and Visual Studio 2008?
In Visual Studio 2003 we had a Windows CE emulator, but now it has mysteriously disappeared since Visual Studio 2005. What can we do then? First thing to do is to install the SDK that the device manufacturer should provide. Sadly, not all manufacturers include the emulator on the SDKs. Still, it is a good idea to use an emulator as close as possible to the real device where our applications are going to run. So if you have a good communication with your manufacturer, the best option would be to ask them to include the emulator for you on their SDK.

It could be the case that the final decision about the device has not been taken yet, but still you want to make some progress on the development of the applications. For this case, I can give you two options:

First (and simpler) option would be to download and install the samples from this book:
Programming Windows® Embedded CE 6.0 Developer Reference, Fourth Edition
http://www.microsoft.com/mspress/compan ... 735624177/

These examples are actually an SDK with an emulator, and some project samples of Windows CE C++ development. Of course buying the book would also be good.

The second choice would be to install the Platform Builder evaluation version (it can be found as Windows Embedded CE 6.0 on the Microsoft website), and to build an SDK from scratch using the emulator as the hardware base. In this case we have the possibility to configure the operating system for the functionalities we expect to have on the real device.

.Net Compact Framework in Windows CE
.Net Compact Framework 2.0 can be integrated in Windows Embedded CE 6.0, so that it could be potentially included in every Windows CE distribution we make. If we also install Windows Embedded CE 6.0 R2 (a kind of Service Pack) and all its updates, we could also include .Net Compact Framework 3.5.

But often we do not have control over the functionalities of the device we are going to use, so it may be a good idea to be clear on which version of .NETCF will be available for us, and then only use this version as support for our applications. Even when in Windows CE (as in Windows Mobile) is possible to install .NETCF 3.5, the deployment of our applications will be easier if we restrict ourselves to what is already offered on the device.

Conclusion
Developing applications in .Net Compact Framework over Windows CE should present the same level of difficulty as developing over Windows Mobile. We just have to be clear on the differences between these operating systems and which functionalities we have and which ones we will not have for a given device. So, have a happy coding!

Other resources

Other posts about Windows CE vs Windows Mobile
http://blogs.msdn.com/mikehall/archive/ ... 95958.aspx
http://blogs.msdn.com/fzandona/archive/ ... 99485.aspx

A very good book, it can be download for free but you will need and MSN account.
Windows® Embedded CE 6.0 Fundamentals
Stanislav Pavlov and Pavel Belevsky

A list of very good learning resources from Microsoft (including the link to download the book Windows® Embedded CE 6.0 Fundamentals).
http://msdn.microsoft.com/en-us/windows ... 67860.aspx
Amyuni Development Team

Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - https://www.amyuni.com
Post Reply