Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory

Keywords: Match:
Will my application run on Windows CE?
by Mike Hall (May 23, 2007)

Foreword: In this interesting article, Windows Embedded technical product manager Mike Hall examines a fundamental difference between Windows CE and the Windows desktop and Windows Mobile operating systems. Namely: you can't be certain a Windows CE application will run on any specific Windows CE image.



Will my application run on Windows CE?

by Mike Hall


Windows Desktop (XP/Vista) and Windows Mobile have the benefit of being a well defined application platform, if you write an application to run on Windows Vista then you know that the same application will also run on another PC running Vista. If you write a Windows Mobile 6 Professional (Pocket PC) application then you know that the same application will also run on other WM 6 Professional devices (assuming that you have catered for different screen resolutions, DPI, orientation etc...). The point being that the underlying API set for the "platform" is very well defined. This isn't the case on Windows "Embedded" CE.

CE 6.0 is an operating system that can be customized by developers by choosing the set of underlying o/s components they need for their device, this in turn drives the exposed API set for a specific operating system image. There isn't a concept of a "Standard Windows CE Platform" (unless you consider Windows Mobile to be that standard platform). Application developers don't know whether an application they have written for one custom Windows CE platform will run on another platform since the underlying components and therefore API's are probably going to be different across the devices.

This isn't strictly true of course. In many respects the .NET Compact Framework does add an application compatibility layer to the operating system at two levels, the first is the .NET Compact Framework and exposed assemblies/classes. Since the Compact Framework isn't componentized you know for sure that a .NET Compact Framework application written for one device will run on another device that includes the framework, assuming that the application doesn't p/invoke out to operating system specific APIs. The second level of compatibility is the underlying dependencies that are added to the operating system through adding the .NET Compact Framework to a Windows CE operating system image, knowing that the .NET Compact Framework is on an embedded device gives you a known set of native code APIs to call on the operating system.

So how do you know whether your application is going to run on a device? One way to find out is to copy the application (and support files) to the device and run the application, this could give one of two results, either the application crashes with an "Invalid Operation" error message, or appears to run correctly. I say "appears" to run, because it's possible that you haven't tested all code paths within the application, or didn't dynamically load a DLL that calls into missing operating system functions (and then causes the application failure).

An application developer may well build and test their application on a specific configuration of the CE 6.0 operating system. Once the application is written the import tables of the application and support binaries could be used to build a list of needed DLLs and exposed functions (take a look at "Dumpbin /imports").

This list could then be compared against a specific platform by writing an o/s 'checker' tool, which would need to be Win32, C/C++, and not rely on any specific o/s technologies beyond reading a text file containing the list of DLL's and functions. The utility could read the name of a DLL and the names of exposed functions and try loading the DLL (LoadLibrary) and then check to see if the exposed function was there (GetProcAddress). If all DLL's exist, and all functions return with a valid address then you are in business.

Of course, the alternative is to get a list of known operating system components (SYSGENs) needed by your application and provide this to the company building the embedded device.


Copyright (c) 2007 Microsoft Corp. All rights reserved. Reproduced by WindowsForDevices.com with permission. This article was originally published on Mike Hall's Blog, here.



About the author: Mike Hall is Technical Product Manager in Microsoft's Mobile and Embedded Devices Group, on the Windows Embedded team. Among other things, he writes an extensive (and often entertaining) blog that's published on Microsoft's MSDN developer website.



Related stories:

(Click here for further information)


7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

4 Legal Reasons to Control Internet Access
The Internet is obviously a valuable resource for many organizations. However, many are exposed to legal liability concerns because they fail to control Internet access. Learn if you're safe in this white paper.

Rapidly Resolve J2EE Application Problems
Whether you are in the process of building J2EE applications or have J2EE applications already running in production, you must ensure that they deliver the expected ROI. Learn how in this white paper.

Load Testing 2.0 for Web 2.0
There are many unknowns in stress testing Web 2.0 applications. Find out how to test the performance of Web 2.0 in this white paper.

Build Better Games Online
For the game infrastructure providers, life is complex. Making money from games has become more complicated. Why? Find out in this white paper.

Building a Virtual Infrastructure from Servers to Storage
This white paper discusses the virtual storage solutions that reduce cost, increase storage utilization, and address the challenges of backing up and restoring Server environments.

Gaining Faster Wireless Connections with WiMAX
Welcome to what is quickly becoming the hyperconnected world where anything that would benefit from being connected to the network will be connected. Learn more in this white paper.

Is Your Desktop a Security Threat?
The new wave of sophisticated crimeware not only targets specific companies, but also targets desktops and laptops as backdoor entryways into those business’ operations and resources. Learn how to stay safe in this white paper.

Increasing SAN Reliability by 100 Percent
Storage area networks (SAN) are a strong part of storage plans. Learn how to increase your reliability and uptime by 100 percent in this case study.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

HOT TOPICS
2006 Windows Embedded retrospective
Windows CE 6 Arrives
Shared source contest winners
Ultra Mobile PCs
Spotlight on SPOT
Embedding Windows is 4X cheaper than Linux
CE "core" reduced to $3

...in our 2007
Windows Embedded Market Survey
Check out the latest Windows-powered...

mobile phones!

other cool
gadgets

REFERENCE GUIDES
Windows Device Showcase
Intro to Windows Embedded
Intro to Shared Source
Real-time Windows Embedded
Windows Embedded books

BREAKING NEWS

• Windows XP leaps onto OLPC laptop
• "1-Watt" x86 processor powers pico-ITX board
• Webcast covers Windows Mobile development
• "Software-only" GPS supports WIndows
• Atom-based ECX board runs Windows
• $7 SoC runs Windows CE
• April XPe chat transcript available
• Little thin client runs Windows CE or XP Embedded
• Microsoft releases VS 2008, NET Framework 3.5 betas
• E-reader boasts 6-inch EPD display, Windows CE
• Thin clients bulk up on software
• Microsoft warns of Windows CE 5.0 security hole
• New COM design claims extra robustness
• Windows Mobile 6.1 phone has sportscar styling
• SDIO controller supports multiple memory cards


Join our Windows Embedded discussion forums:
Windows XP Embedded
Windows CE
Windows Mobile


Windows Embedded developer newsgroups
Windows CE
XP Embedded
PocketPC
Smartphone

Microsoft's Windows Embedded resources
Embedded dev center
Mobile dev center
Windows CE tutorials
XP Embedded tutorials
Windows Embedded seminars
Windows Embedded application categories
3rd-party partners

Also visit our sister sites:


Sign up for WindowsForDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory  |  About  |  Contact
 
Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Windows is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries and is used by WindowsForDevices under license from owner. All other marks are the property of their respective owners. WindowsForDevices is an independent publication not affiliated with Microsoft Corporation.