Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesA Kinder, Smaller Windows


August 1997 / Special Report / A Kinder, Smaller Windows

Porting from Win32 to Windows CE can be a simple matter -- if you know what to watch for.

Jim Geier

Microsoft's third attempt at coming out with an OS designed specifically for hand-held PCs seems to finally have taken hold. The company's Windows CE leverages the company's colossal presence in the desktop computing market with an OS and applications that are already greatly familiar to millions of computer users.

Can CE give the slow and stumbling hand-held PC market the kind of kick start that will finally lure legions of businesspeople into its fold? Resistance has come from many fronts. Most hand-held PCs are relatively expensive given the low volume of information they manage; for many people, a far less expensive, paper-bound calendar works just as well. And until handwriting-recognition algorithms are sufficiently advanced, data entry via a stylus offers few advantages ov er pencil and paper; tiny QWERTY keyboards don't allow for fast touch-typing. Finally, proprietary OSes throw up a host of compatibility problems, steep learning curves, and a dearth of familiar applications already used on the desktop.

Windows CE devices promise to make the greatest headway against this latter obstacle. Porting Windows applications to CE is remarkably easy. And anyone currently developing applications for Windows 95 can develop CE applications with little advanced training. With growing support from wireless-device manufacturers, the OS finally stands to give hand-held computers a nascent, but important, role in a wide array of large enterprises.

If you're a Windows developer, you'd better start considering how to port your applications to Windows CE today. Many existing desktop applications that are scaled down to run on CE offer many benefits to business users.

The OS at a Glance

Windows CE is a small but powerful 32-bit, multitasking, multithreaded OS that is a subset of the popular Win32 model (see the figure "The Windows CE Architecture" ). On the development side, CE supports approximately 500 of the 1500 Win32-based APIs. This offers developers a relatively familiar, easy-to-learn environment for building mobile applications. On the other hand, it means you can't run 16-bit Windows or MS-DOS applications on the CE platform.

Windows CE consumes small amounts of RAM, connects easily to the Internet and desktop PCs, and supports a wide array of hardware. It makes use of ROM for running applications, thus minimizing the use of RAM. In addition, CE allows users to seamlessly extend their computing activities to locat ions away from the desk. Consequently, it's an excellent OS not only for hand-held computers but also for Global Positioning System (GPS)-based mapping systems, digital information pagers, cellular smart phones--and even future household appliances.

But don't expect to go buy a copy of Windows CE off the shelf. It's available only to OEMs, hardware manufacturers, and software developers. Current versions exist for the Hitachi SH3, NEC 4100-MIPS, and Philips 3900-MIPS processors.

Currently, hand-held PCs built from a reference platform written by Microsoft are the only commercial devices that support the Windows CE OS. Microsoft's concerted effort to simultaneously establish both hardware and software specifications for the OS was intended in part to head off the disasters that befell the company's previous attempts at hand-held OSes. First there was WinPad, which ran on x86 CPUs with a stripped-down version of Windows 3.1. Input to this machine was limited to handwriting recognition via a stylus-- it had no keyboard. Next, Microsoft attempted to develop Pulsar, which turned out to be a glorified pager. Pulsar offered wireless connectivity, but it had a very small screen and just a few buttons for input.

As Microsoft scrapped these projects, it invested in market research that uncovered the following information: Potential customers need to organize, communicate, and access information while they're away from their desks, and all or most of them have PCs running Windows. As a result, the Windows CE Handheld PC was conceived; it was announced at the fall 1996 Comdex show in Las Vegas.

Microsoft strove for several key goals with the Handheld PC: long battery life, an affordable price (about $500), compactness and light weight, a familiar interface, easy PC connection, and effective keyboard input. The company signed up seven hardware partners to develop hand-held PCs based on the core specifications of its reference platform, allowing each to build on features and capabilities as they saw fi t. These hardware partners included Casio ( http://www.casio.com ), Compaq ( http://www.compaq.com ), Hewlett-Packard ( http://www.hp.com ), Hitachi ( http://www.hitachi.com ), LG Electronics, NEC ( http://www.nec.com ), and Philips Electronics ( http://www.philips.com ).

Although all Windows CE devices differ in price and certain capabilities, they also share many features, which are listed below.

  • An embedded QWERTY keyboard with alphanumeric keys, including standard punctuation, a Control key, an Alt key, and two Shift keys. Other vendor-specific keys are optional. Japanese and Chinese versions will not have keyboards but will instead rely on handwriting recognition alone for data input.
  • An embedded touchscreen with resolutions of 480 by 240 or 640 by 240 pixels, four gray scales, and 2-bit pixel depth ( see the screen ).
  • A stylus that acts like a mouse when it's tapped on the touchscreen.
  • A docking cradle to recharge the machine's batteries and connect it to a desktop PC for file transfer/synchronization.
  • One PC Card slot, one serial connector, and one infrared port (IrDA).
  • A minimum of 2 MB of RAM and 4 MB of ROM.

Windows CE has no standard memory map or interrupt structure, which is typical of PCs. Developers interface Windows CE to their respective hardware platforms by writing interrupt service routines. Therefore, Windows CE will not run on a desktop PC or on a standard laptop.

Most Likely to Succeed

Given these specifications, most applications that you'd want to take with you away from your desk can be ported to the Windows CE environment, minus some functionality. The current version, 1.01, does not support the following:

  • OLE
  • ActiveX
  • COM
  • MAPI
  • ODBC
  • DDE
  • multimedia (except WAV files)
  • color video

Windows CE offer s great relief to users who travel. Imagine you're in your office preparing to leave on a three-day business trip. It's four in the afternoon, you're tired, and your flight leaves at 5:30 p.m. You've spent all day ironing out your travel agenda. Now you're frantically working at your desktop PC, copying files onto a disk, reading and sending last-minute e-mail, and jotting down contact numbers and appointments from your electronic calendar so you'll have them during the trip. After gathering all this information, you throw the disk into your briefcase, grab your laptop, and then hurriedly head for the airport.

Sound familiar? More than 30 million other mobile professionals in the U.S. share this type of last-minute scurry, often forgetting to take along important telephone numbers, schedule information, and files. The answer to this problem is to use a hand-held PC running Windows CE and associated applications. This will make your life much easier in these situations by allowing you to smoothly move fr om working at your PC to continuing your work while you're away from the office and your desk.

Standard Windows 95 word processors and spreadsheets are particularly prime for porting. In fact, Microsoft bundles companion versions of Word, Excel, and Schedule+ with CE. Given that Word and Excel currently dominate more than 80 percent of the market, few enterprises will see any reason to develop stand-alone versions of basic productivity applications for the OS.

All hand-held PCs equipped with Windows CE include a full-featured suite of personal information management (PIM) software, complete with a calendar, an address book, and tasks that seamlessly and automatically integrate with Microsoft Schedule+ 7.0a on the desktop PC. After you connect the hand-held PC to the desktop, the two automatically initiate synchronization. The user can then enable synchronization, set the window of opportunity for synchronization to recognize, and choose which appointments and tasks to synchronize.

Of course, Windows CE also lends itself well to mobile communications applications, such as e-mail, faxing, and Web browsing. For example, it includes an e-mail application called Inbox, which uses standard SMTP and POP3 protocols. Inbox works as a companion to Microsoft Exchange, and e-mail files are easily transferred back and forth between hand-held and desktop PCs.

Most vendors, including Motorola and AT&T, have adapted their radio modems to work with Windows CE using ARDIS, RAM Mobile Data, or CDPD wireless WAN services. In addition, companies such as RadioMail Cooperation ( http://www.radiomail.net ) offer wireless Internet-access applications for the CE platform. RadioMail for Windows CE extends Internet applications over wireless networks and includes two-way wireless e-mail and wireless workgroup messaging for communications among members of a mobile staff. These services also include basic Web access, faxing, paging, stock quotes, and news. The RadioMail service costs approximately $20 per month.

In addition to the common productivity and communications applications, there is already a wide array of vertical applications for CE devices. Physix ( http://www.physix.com ), for example, offers PocketChart for Windows CE, an electronic medical-record and clinical-information system that runs on a hand-held PC. PocketChart offers a full set of features, such as patient lists, chart notes, a lab browser, on-line billing codes, automated prescription writing, and dosage checking.

TeleType ( http://www.teletype.com ) provides a GPS for Windows CE. A GPS receiver incorporated into PC Card form factor provides latitude and longitude information from a satellite to applications running on the hand-held PC. This keeps the hand-held PC informed of its exact geographical location, providing the basis for some interesting applications. TeleType's application has a moving map on the hand-held PC screen that corresponds to your location.

Roving Software ( http://www.roving.com ) offers the Roving Reporter for Windows CE, an application and corresponding service that allow you to create a personalized newspaper that automatically receives news, weather, sports, financial data, and any Internet- or LAN-based corporate da ta. You just turn on your hand-held PC and read current stories.

Many enterprises have begun developing applications for the OS on their own. CE is particularly well suited to data-collection systems. For example, a hand-held PC interfaced with a bar code scanner, radio network, and applicable Windows CE-based applications software can improve the accuracy and efficiency of identifying and tracking items in manufacturing plants, hospitals, stores, and so on.

A bar code can identify an inventory item with a number, much like a license plate on a car. After scanning the bar code using a scanner appliance, the identification number maps to the status of the item stored in a database and then reports corresponding information back to the user via the Windows CE interface. At this time, the user can change the status of the item by entering applicable data, which updates the database.

Think Small

For developers and end users alike, Windows CE is very similar to the Windows 95 and NT Work station 4.0 environments. The important differences between developing for these larger OSes and developing for CE revolve around hand-held PCs' small form factor, low memory, and tiny displays.

The Windows CE shell and user interface, as shown in the figure "The Windows CE Architecture" , provide a look and feel similar to that of Windows 95 and NT Workstation. The shell includes the desktop, the taskbar, and a recycle bin. Windows CE differs from these OSes in its limitations in the windowing subsystem. CE doesn't support multiple overlapped windows, and you can't resize windows. Microsoft decided not to include these features because users would be unlikely to have multiple windows open within such a small screen size.

Nearly all standard and common controls exist; however, they have limited features. For example, property sheets are supported, but wizards are not available because they take up too much memory space. Also, CE supports only two common dialog boxes: File Ope n and File Save As. Other dialog boxes, such as the color and print boxes, don't make sense on a hand-held PC because the display is in black and white. In addition, Windows CE does not directly support printing. It has a new control, called the CommandBar, which combines a window's caption bar, menu bar, and toolbar into a single entity.

The Windows CE memory architecture consists of both RAM and ROM. ROM contains the system kernel and a set of applications, including Explorer, Calculator, and Control Panel applets.

In a 2-MB system (a typical configuration), RAM consists of two 1-MB sections. Section 1 of RAM is the object store, which functions like a single hard drive. The user saves new applications and data files in the object store. Section 2 of RAM, which Microsoft refers to as the system storage area , is for storing process heaps, thread stacks, application code, virtual memory allocation, and so forth.

The system always compresses files in RAM, generally at a 2:1 compress ion ratio. When a user runs an application, Windows CE decompresses the program and places it in system storage. Files in RAM take precedence over files in ROM. If there are two programs with the same filename, one in ROM and the other in RAM, the OS will run only the program that's located in RAM. In other words, you'll want to make sure that your filenames are unique--take advantage of CE's support for long filenames.

The base-level configuration of the OS requires about 150 KB of ROM and 400 KB of RAM to run, with the full H/PC OS taking up about 2 MB. To optimize performance, users and developers can divide the usage of the object store and system storage via the "memory tab" in the control panel's system applet. This allows you to adjust memory availability based on the applications that are running on the hand-held PC.

Because of the portable intentions of Windows CE, it has very good power- management and user-notification features. The OS constantly monitors the system, looking for ways to conserve power. For example, the OS suspends the processor when all threads are waiting for events, which is the case most of the time. To support PIM-type applications, Windows CE consists of special commands that allow developers to alert users with dialog boxes. For example, the command PegGet_UserNotificationPreference displays a dialog box for users to respond to a notification. CE also supports the ability to run applications on triggers, such as when the machine boots or a power supply is connected.

In addition to the support it offers for Windows PC Card and Socket Services, Windows CE includes the following connectivity features:

  • TCP/IP and PPP, which allow easy integration with server software.
  • A subset of the TAPI, Unimodem, and RAS APIs for dial-up connections.
  • An HTML version of Microsoft Internet Explorer--however, the small screen on a hand-held PC makes it difficult to see where you're surfing.
  • The file filter converts color bit-map and icon files to 2-bit-per-pixel bit maps during the copying process.

Choose Your Tools

A variety of tools are already available for developing CE applications--from Microsoft and other vendors. Development for CE is somewhat different from Windows 95 and NT development because of CE's limited APIs and functionality.

The best results come from developing and simulating an application's behavior on a desktop PC. Once the application has been thoroughly tested and refined, the port to a hand-held PC should be a relatively quick and painless matter. When adapting an existing desktop application to run on Windows CE, most likely it must be scaled down in terms of features and functionality to fit within the constraints of Windows CE.

Visual C++ developers can turn to Microsoft's newly released Visual C++ for Windows CE. Priced at $199, it's an add-on component to Visual C++ 5.0. It uses the same C11 compiler technology used in Visual C++ 5.0 for the desktop; it also includes new cross-compile rs for CPUs that Windows CE currently supports.

For developers who must tie Windows CE to new hardware platforms, Microsoft offers the OEM Adaptation Kit. OAK provides the CE code for adapting the OS to particular hardware platforms. Microsoft has also carefully selected a number of system integrators who can assist OEMs in adapting Windows CE to their particular hardware platform. OAK requires you to get an OEM license from Microsoft; it's not a generally available tool.

Microsoft's Windows CE Desktop Emulation SDK is currently available free for downloading from http://www.microsoft.com/windowsce/developer/ . Using your desktop development tools, you can create Windows CE applications that run in emulation on your PC; Visual C++ for Windows CE's cross-compilers and remote tools ar e required for targeting Windows CE devices.

Many third-party companies have tools that add features to Windows CE. Metrowerks ( http://www.metrowerks.com ), for example, will offer later this year development tools for CE via its CodeWarrior products for embedded and consumer-electronics software development. CodeWarrior's cross-platform compilers support C, C++, Pascal, and Java and allow programmers to build applications for a number of target platforms from a single development environment.

In addition, Syware ( http://www.syware.com ) offers Dr. DeeBee, an ODBC driver for Windows CE. Dr. DeeBee allows Window s CE-based hand-held computers to act as data servers to desktop applications. This provides connectivity to desktop-based applications, such as Microsoft Access, Excel, and Visual Basic. The ODBC 2.1-compliant driver is Windows 3.X based on the desktop PC, thereby consuming none of the hand-held's memory space. By utilizing the Dr. DeeBee ODBC driver, desktop software developers can communicate with Windows CE without writing code to a new API.

Another useful product is Wright Strategies' ( http://www.wrightstrat.com ) FormLogic . This package is a development environment that replaces field-based paper processes with hand-held computers; eases the development, deployment, and management of hand-held applications for occasionally connected mobile workers; and enables the connection of h and-held computers to network data sources and existing systems (see the screen on page 105).

The future for Windows CE appears bright because of its efficient standards-based development environment. If you are a Windows programmer, you'd better get proficient in writing CE applications. More than 1000 developers have already enrolled in the Windows CE Technical Beta Program, and more than 90 software and hardware companies have already announced products for the hand-held PC. If you're a user, then start looking--many Windows CE applications for the hand-held PC are on the way.


Where to Find


CIM Concepts

Plantation, FL
Phone:    954-472-7009
Internet: 
http://www.cim-rf.com


Compaq

Houston, TX
Phone:    800-345-1518
Phone:    7
13-514-0484
Internet: 
http://www.compaq.com


Hewlett-Packard

Palo Alto, CA
Phone:    408-553-2916
Internet: 
http://www.hp.com


Hitachi

Tarrytown, NY
Phone:    914-332-5800
Internet: 
http://www.hitachi.com


Microsoft

Redmond, WA
Phone:    206-882-8080
Internet: 
http://www.microsoft.com


NEC

Mountain View, CA
Phone:    800-456-9372
Phone:    415-528-5306
Internet: 
http://www.nec.com


Philips

New York, NY
Phone:    408-523-2874
Internet: 
http://www.philips.com


Physix

Houston, TX
Phone:    800-749-2585
Phone:    713-797-1199
Internet: 
http://www.physix.com


RadioMail

San Mateo, CA
Phone:    800-597-624
5
Phone:    415-286-7839
Internet: 
http://www.radiomail.net


Wright Strategies

La Jolla, CA 
Phone:    619-551-6808
Internet: 
http://www.wrightstrat.com


HotBYTEs
 - information on products covered or advertised in BYTE


Windows CE 2.0

The current version of CE, 1.01, should be replaced with version 2.0
by the time you read this (it's currently in a beta-test phase).
Users will be able to upgrade to the new version by swapping out ROM
chips. Release 2.0 will contain several
 welcome enhancements:

* support for 486 processors from Intel and AMD
* support for the 82X series of the PowerPC chip from Motorola
* support for up to 24-bit color
* printing support
* LAN connectivity via NDIS and SMB
* Widely available support for ActiveX, Java, Visual Basic run-time, 
   and Microsoft Foundation Classes



The Windows CE Architecture

illustration_link (13 Kbytes)

Windows CE's modular, layered design enables easy application porting and makes it simple to strip the OS down to its bones.


Sizes of Grey

screen_link (14 Kbytes)

Windows CE's desktop is minimal (especially in gray scale), but it contains all the essentials.


Consolable You

screen_link (23 Kbytes)

FormLogic's administration console enables the controlled distribution of Windows CE software.


Hit the GPS Highways

screen_link (42 Kbytes)

The TeleType GPS Highway Navigator includes all U.S. interstate highways.


jim_geier@ccmail.mmsday.com or 71165.2045@compuserve.com .

Up to the Special Report section contentsGo to previous article: Go to next article: Unplugging Windows CESearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network