Home > Store

Building Powerful Platforms with Windows CE

Register your product to gain access to bonus material or receive a coupon.

Building Powerful Platforms with Windows CE


  • Sorry, this book is no longer in print.
Not for Sale




  • Copyright 2000
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-61636-X
  • ISBN-13: 978-0-201-61636-1

The true potential of Windows CE lies in its ability to provide a robust, low-cost platform for system integration on custom, non-PC hardware: handhelds, wireless devices, TV applications, terminals, smartcards, even household appliances. Building Powerful Platforms with Windows CE goes beyond Microsoft's documentation to deliver the real-world detail developers need to minimize risk, improve performance, and get to market fast. The authors begin with a detailed overview of Windows CE, its motivation, goals, architecture, design, and implementation. Next, they review the crucial, often-ignored project management issues associated with custom platform development. They introduce Microsoft's Windows CE Platform builder, demonstrate how to quickly create custom builds, and demystify Microsoft CE's confusing boot loader. The book includes a full chapter on building CE Hardware Abstraction Layers, and exceptional step-by-step guidance on designing, implementing, and debugging CE device drivers. Finally, the authors take you further inside the Windows CE build process, show how to extend Platform Builder; and explain how to use Microsoft's Device Driver Test Toolkit to streamline testing.


CD Contents

Download the CD Contents from this book.


Related Articles

Kick Start Your Windows CE Project

Resources for Windows CE Developers

Author's Site

Click below for Author's Site related to this title:
Author's Web Site

Sample Content

Downloadable Sample Chapter

Click below for Sample Chapter related to this title:

Table of Contents

(NOTE: Each chapter concludes with a Summary.)


Introduction to the Book.

Web References.


About the Authors.

1. Windows CE Architecture.

Cross-Processor Support.

Page Size.

Common Executable Format.

Processes and Threads.

Creating Processes and Threads.

The Scheduler.


Communicating between Processes.

Memory Architecture.

Virtual Memory.

Slot Architecture.

Manipulating Memory.

Heap Memory.

Stack Memory.

Handling Low Memory Conditions with WM_HIBERNATE.

Graphics, Windowing, and Events Subsystem.

Graphical Device Interface.

Window and Dialog Management.

User Input.

Windows Messaging.

Power Management.

File System.

Object Store.

Storage Media.

Manipulating Files.

Manipulating Folders.

Manipulating Databases.

Manipulating the Registry.











Web Server.


2. Road Map to Managing a Windows CE Project.

Orbiter: A Windows-Based Terminal.

Is Windows CE the Right Choice?

Platform Requirements.

Windows CE Licensing and Development Model.

Development Environment.

CE Toolkits.

Development Tools.

Training Your Team.

Getting Started

Identifying Prototyping Opportunities.

Architecture and Design.

Platform Task Discovery.

Public Task Discovery.

Specifying the System.

Creating a Technical Specification.

Creating a Schedule.

Creating and Allocating Tasks.

Adding Duration to Tasks.

Using Milestones to Create a Visible Schedule.

Maintaining a Live Schedule.

Task-Complete Demos.

Strategies for Version Control and Automated Builds.

Managing New Projects.

A Brand-New Product.

Feature Enhancements to an Existing Product.

A New Product with Platform-Specific Changes.


Windows CE Device Driver Test Kit.

Benchmarking the Device.

3. Platform Builder Basics.

Exploring Components in Platform Builder.

Platform Builder Catalog.

Creating a New Platform with the Platform Wizard.

Building and Executing the Platform.

Creating Applications for Your Platform.

Windows CE Project Wizard.

Building the Application.

Testing the Application during Rapid Development.

Running Windows CE on a CEPC.

Kernel Debugging.

Debugging Capabilities of CESH.

Integrating New Components into the Image.

Customizing the Build Using Environment Variables.

Extending the Platform Builder Catalog.

Component Files in Depth.

Adding a Component to the Catalog.

Creating a New Board Support Package.

BSP File Directives.

Finishing the New BSP: Appliances.

4. The Windows CE Boot Loader.

Windows CE Boot Loaders.

Designing a CE Boot Loader.


Beginning with the Sample Code.

Startup Code.

Processor Configuration Code.

Platform Configuration Code.

Initializing the Contents of RAM.

Power-On Self-Test.

Loading the CE Image.

Downloading Code.

Jumping into the CE Kernel Image.

OEM Boot Loader Functions.

Serial Port Input/Output Functions.

LED Function.

Ethernet Boot Loader Functions.

Whether or Not to Ship the Boot Loader in Production Code.

Building the Boot Loader.

Sources File.


Romimage Build Tool.

Running the Build.

Debugging the Boot Loader.

Output through LEDs and Sound.

Serial Port and Parallel Port Output.

Display Output.

ROM Monitor.

ROM Emulator Products.

On-Chip Debugging.

Logic Analyzer.

In-Circuit Emulator.

5. OAL Development.

OAL Architecture.

OAL Development: Phase 1.

Sample OALs.

Building the OAL.

Kernel Startup Routine and OEMWriteDebugLED.


Timer ISR.

OEMInitDebugSerial, OEMWriteDebugByte, OEMWriteDebugString, OEMReadDebugByte, and OEMClearDebugCommError.

OAL Development: Phase 2.

Ethernet Kernel Debugging Functions.

Interrupt Service Routines.

Nested Interrupts.


OAL Development: Phase 3.

Module Certification.

Power Management.

Persistent Registry.

6. Writing Device Drivers: Introductory Concepts.

When to Write a CE Device Driver.

Onboard and Installable Devices Compared.

Device Driver Models.

Device Classes.

Device Driver Architecture.

Microsoft Products Required for Driver Development.

Sample Device Driver Source Code.

7. Writing Device Drivers: Driver Models.

Stream-Interface Device Driver Model.

Device Manager and Driver Control Programs.

When to Write a Stream-Interface Driver.

Registry Entries.

Device File Names.

Load Sequence.

Power Cycling.

Required Entry Points.

Application-Initiated Loading. AHEADS = Native Device Driver Model.

Native Device Driver Model Architecture.

Required Entry Points.

Automatic Loading.

Building a Native Device Driver.

USB Device Driver Model.

USB Device Driver Model Architecture.

Automatic Loading.

Required Entry Points.

Providing Application Services.

NDIS Device Driver Model.

NDIS Device Driver Model Architecture.

Automatic Loading.

Building the Device Driver.

Building from the Command Line with the Platform Builder.

Building with the Platform Builder IDE.

Building with eMbedded Visual C++.

Device Driver Installation.

Application Manager.

Cabwiz.exe CAB Files.

Ceappmgr.exe INI Files.

User Requested.

8. Writing Device Drivers: Implementation Practices.

Processing Interrupts.

The Interrupt Service Thread.

Accessing the Physical Resources of Your Device.

Platform-Independent Input/Output.

Managing Buffer Pointers.

Sharing Memory between Drivers and Applications.

Shared Memory Approaches Compared.

API Readiness.

9. Debugging Device Drivers.


Remote Debugging.

Local Debugging.

Log-Level, Application-Level, Kernel-Level, and Hardware-Level Debugging.

Log-Level Debugging.

Application-Level Debugging.

Kernel-Level Debugging.

Hardware-Level Debugging.

Driver (DLL) Debugging.

Breakpoint and Single-Stepping Issues.

Debugger Transports.

Platform Builder Remote Connections.

Platform Manager.

Building a Device Driver for Debugging: Method 1.

Step 1: Selecting Modules from the Catalog Window.

Step 2: Modifying Platform.bib.

Step 3: Modifying Platform.reg.

Step 4: Setting Up a Stub Project.

Building a Device Driver for Debugging: Method 2.

Step 1: Removing Modules from the Catalog Window.

Step 2: Creating a Driver Project.

Step 3: Adding the Driver Source Modules to the Project.

Step 4: Modifying the DLL Entry.

Step 5: Modifying Platform.bib.

Step 6: Modifying Platform.reg.

Debugging Use Cases.

Custom Platform Serial/Parallel Port Debugging Configuration: Use Case 2.

Alternative Configurations.

Standard Platform Serial Port Debugging Configuration: Use Case 3.

Tracking Processes and Threads.

Zone Debugging.

Log Tracer.

10. The Windows CE Build Process.

Components and Modules Revisited.

The Directory Structure of Platform Builder.

Setting Up the Build Process.

How Wince.bat Works.

Building a Project.

Generating the Windows CE System: Sysgen.bat.

Windows CE Initialization Files.

The CE Component Filter.

How Sysgen.bat Works.

Building OEM Source Code: Build.exe.

Building the Release: Buildrel.bat.

Making the Windows CE Image: Makeimg.exe.

Windows CE Localization.

Merging Initialization Files.

Creating the Final Image.

11. Building a Sample Windows CE Project.

Brewster: A Coffee Maker for the Millennium.

The Brewster Makefile.

Specifying System Modules and Components.

Modifying the Initialization Files.

Adding Source Code to Brewster.

12. Device Driver Test Kit.

DDTK Tools.

Tux Test Harness.

Test Scripts.

Test Discovery.

Passing Information to the Test Harness.

Housekeeping Messages.

The Test Function.

Executing a Test.

Running the Test in Multiple Threads.

Running Tests from Tux.

Suite Files.

Logging Tux Test Results.

Creating a Kato Object.

Starting a Level.

Sending Traces for Logging.

Filtering Logs with Verbosity.

Ending a Level.

The Tux Demo Program.

Appendix A: Windows CE Modules and Components.

Appendix B: A Makefile Primer.

Defining Targets.


Makefile Preprocessing.

Command-Line Options.

Appendix C: CE Developer Resources.

Usenet Newsgroups.


Web Sites.

Mailing Lists.

Windows CE System Integrators.

Third-Party Tools.

CEPC Vendors.

CE Reference Platform Vendors.

ROM Emulation Tools.

Silicon Vendors.

PCMCIA Documentation Sources.

Appendix D: An Introduction to Writing Windows CE Display Drivers by Jeff Spurgat</I>.

Fundamentals of Graphics and Display Hardware.

Display Driver Overview.

Graphics Primitive Engine Classes.

Improving the Display Driver Classes.





Throughout the 1980s and 1990s, technological advances that gave rise to the Internet and wireless communications began to mount a serious challenge to the limited role of a personal computer (PC). Initially visualized as a more personalized extension for large mainframe computers, concealed in mysterious rooms with raised floors and noisy air conditioners, the personal computer soon became the center of home and office computing. Today we are witnessing the emergence of yet another type of computer: portable information appliances, offering even more personalized computing than the personal computer anchored to one’s desktop. These devices are made more powerful not by ever increasing CPU speed and available storage, but by their ability to function as a distributed computer, accessing the world’s most powerful asset, information.

Digital cable and digitized music, voice, and video are some examples of this information, which is made more valuable by access through portable information appliances. Just imagine what would happen if televisions, music entertainment systems, telephones, and camcorders could all work together. New usage models would appear, effectively creating a scenario in which the functionality of these systems acting collectively would exceed their usefulness when acting individually. For example, entire movies could be shot, edited, and produced via an array of interconnected, portable information appliances that worked together to provide online distribution, without the need for physical media. When usage models such as these become reality, they will challenge traditional ways of doing business.

The technological objectives in the engineering of a portable information appliance are quite different from those of a desktop PC. Portable information appliances must be compact, lightweight, and economical, and they must provide a slew of new features–most importantly, connectivity with other information appliances. Established operating systems like Windows, UNIX, MacOS, and Linux, designed for desktops with ever increasing processing and storage capabilities, are often unsuitable for such appliances. A smaller, lightweight, and highly flexible operating system is required.

Microsoft’s solution in this space is the Windows CE operating system. Designed and implemented for devices with limited computing and storage resources, it offers a variety of features that make it possible to create highly specialized, portable information appliances. A small sample of such devices would include industrial controllers, phones, music players, televisions, game consoles, camcorders, organizers, and even compact laptops.

Using Windows CE to create a custom platform is a process that we callBuilding Powerful Platforms with Windows CE. Microsoft’s premier tool for building custom platforms is aptly called Windows CE Platform Builder. This book takes a focused look at the use of this tool and, in exploring its features, outlines the process by which CE is modified to support your platform’s distinguishing features.

We would like to think that this book has something for everyone, and though this may be true, you will undoubtedly find it most useful if you are an engineer working to adapt CE to function on a custom platform. If you are a software engineer dedicated to writing software for a particular device, traditionally known as embedded-systems engineering, your job will be to get CE up and running as soon as possible. Our prime directive in writing this book is to accelerate this process, by giving you an understanding of CE from the perspective of an embedded-systems software engineer. If we are successful, you will be as familiar with CE as you are with your custom platform, and you will be well equipped to avoid any unexpected gotchas.

We have taken great pains to go beyond simply documenting the use of Platform Builder. We treat Platform Builder as a tool that you can use effectively only if you’re equipped with an understanding of certain principles and practices. To this end we have created a set of 12 chapters that will provide you with expertise in a particular principle or practice. Chapter 1 introduces Windows CE–its motivation, goals, architecture, design, and implementation. In Chapter 2 we discuss the often ignored project management aspects of creating a custom platform with Windows CE. This chapter walks the technical lead and/or project manager through the discrete steps involved in completing a CE custom platform project.

Chapter 3 introduces Windows CE Platform Builder. It describes how to use Platform Builder to quickly create a custom build of the Windows CE kernel. In Chapter 4 we demystify the more challenging aspects of creating and debugging a boot loader by analyzing the Platform Builder sample boot loader source code and the various options available for debugging boot loader code. Development of the OEM Adaptation Layer (OAL), the mechanism used by CE to access the hardware of your custom platform, is covered in Chapter 5. Chapters 6 through 9 dissect how to design, implement, and debug Windows CE device drivers.

To put it all together, Windows CE uses a complex and powerful process to build the operating system. This build process is explored in Chapters 10 and 11. In Chapter 12 we detail a little-used feature of Windows CE, the Device Driver Test Kit (DDTK), which can be used to implement automated testing and can be of significant value in the manufacturing process for your custom device.

Four different appendices are provided for additional background on topics of interest to CE developers. Appendix A lists the CE modules that help to document how the functionality of the overall operating system has been partitioned. Appendix B provides a primer on the use of the Nmake tool and the creation of the files needed to manage the build process for any software project. Appendix C provides a list of resources that are helpful in jump-starting the process of making CE operational on your custom platform. This appendix is referenced at various places throughout the book. Appendix D provides an excellent overview of the process of creating CE display drivers.

Document Conventions

Upload versus Download

The terms upload and download are used throughout this book. The Microsoft documentation that accompanies the Windows CE Platform Builder (CEPB) does not distinguish between the uploading and downloading of data and uses these terms interchangeably. In this book we have opted to use both the terms upload and download to describe more accurately what is happening when data is flowing from one location to another. To minimize any confusion on this matter, we will explain how these terms are used in the context of this book.

At times the location of data may correspond to a development workstation, while at other times the device (or target platform) is the focus of your CE development efforts. Consider for a moment that we are describing the flow of data with respect to your development workstation. If data is being sent to your CE device, it is flowing away (upstream) from its source (the development workstation), so it is said to be uploading. In contrast, if data is being received from its source (the CE device), it is flowing into your development workstation (downstream), so it is said to be downloading. The key to remembering the difference is to realize that you can only upload to and download from.

Text Conventions

The following table describes the typographic conventions used throughout the book. These conventions do not apply to listings or figures.


Main Purpose(s)


Monospace font

To format all listings and to refer to a particular element (i.e., function name, variable, macro, etc.) of a listing, as well as to path and file names.

(1) Beginning of the SHx StartUp routine...

Boldface type

To refer to menu items, window names, and new terms.

(1) File | New menu item
(2) New Platform window
(3) A component is a particular functionality...

Italic type

To refer to words as words, to emphasize an important point, and to identify on-screen messages.

(1) The word project in this case...
(2) It is best to follow the dictum, Do not add files you do not own.
(3) The message Copying Platform header files... is displayed...

Angle brackets: < >

To refer to the name of an item or symbol. When you see this notation in a syntax statement, substitute the item or symbol with the data it references, but do not type the angle brackets. If angle brackets appear without surrounding square brackets or braces (described below), the associated data is required.

If you see
<CE Version>\PLATFORM\<Platform Name>\KERNEL\HAL\debug.c and the name of your platform is Sherry and you’re using CEPB version 3.0, you might type "WINCE30\PLATFORM\SHERRY\KERNEL\HAL\debug.c".

Square brackets:

To refer to optional arguments or parameters for commands. You may omit optional arguments and parameters in any command.

If you see
CESH —p <CESH configuration saved in the registry>,
you might type
"CESH —p CEPC" or "CESH".

Braces: { }

To indicate a choice of arguments or parameters for commands. If the arguments appear separated by a vertical line–{ | }–you must select one.

If you see
you might type

Web References

The Addison-Wesley Web site at http://www.aw.com/cseng will provide an updated list of any scheduled appearances by this book’s authors, along with scheduled trade shows for Addison-Wesley and references to book reviews for this book as they become available. The Addison-Wesley Web site specifically dedicated to this book, at http://www.aw.com/cseng/titl es/0-201-61636-X, will provide additional information on this book’s content and an errata section for errors discovered after publication. The same page will include a link to the authors’ Web site, providing general references for Windows CE software development and updates to the book’s accompanying software.



Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020