Introduction to Windows CE

Microsoft® Windows® CE is a compact, highly efficient, scalable operating system (OS) that is designed for a variety of embedded systems and products. Its multithreaded, multitasking, fully preemptive OS environment is designed specifically for hardware with limited resources. Its modular design enables embedded systems developers and application developers to customize it for a variety of products, such as consumer electronic devices, specialized industrial controllers, and embedded communications devices.

To ensure maximum flexibility, Windows CE is portable to many 32-bit processors, including the following chip sets:

AMD X5 | MIPS R4101
ARM 720T | Motorola MPC823
ARM SA-1100 | NEC VR4111 (16-bit support)
Hitachi SH4 (16-bit support) | NEC VR4300
IBM PPC 403GC | PPC 821
MIPS 4102 | QED5230
MIPS R3910 | SH3
MIPS R3912 | x86

For the most up-to-date information on supported chip sets, see the Windows CE Web site at http://www.microsoft.com/windowsce/embedded/partner/semiconductor.asp

Windows CE supports various hardware peripherals, devices, and networking systems. These include keyboards, mouse devices, touch panels, serial ports, Ethernet connections, modems, universal serial bus(USB) devices, audio devices, parallel ports, printer devices, and storage devices, such as PC Cards.

Additionally, Windows CE supports more than 1,000 common Microsoft® Win32® APIs and several additional programming interfaces that you can use to develop applications. These interfaces include:

  • Component Object Model (COM)
  • Microsoft Foundation Classes (MFC)
  • Microsoft® ActiveX® controls
  • Microsoft Active Template Library (ATL)

Furthermore, Windows CE supports the following technologies:

  • Real-time processing for managing time-critical responses
  • A variety of serial and network communication technologies, including USB support
  • Mobile Channels, which provides Web services for Windows CE users
  • Automation and other methods of interprocess communication

For hardware that is intended to perform as an adjunct to a desktop computer, Windows CE provides the following tools to allow a user to manage and transfer data between a desktop computer and an attached Windows CE–based device:

  • A connection manager for establishing and maintaining a connection
  • A data synchronization interface to allow synchronization of shared data
  • File filters for importing and exporting files
  • A remote application programming interface (RAPI) for enabling a client on a desktop computer to request services, such as file manipulation, from a server on an attached Windows CE–based device
  • Application installation and management services for installing and uninstalling Windows CE–based applications from an attached desktop computer or other sources

In short, Windows CE is streamlined and flexible enough to use in a variety of small embedded systems, yet powerful enough to use in the newest generation of high-performing industrial and consumer devices.


Operating System Architecture

Windows CE is built from a number of discrete modules, each providing specific functionality. Several of these modules are divided into components. Components enable Windows CE to become very compact (less than 200 KB of ROM), using only the minimum ROM, RAM, and other hardware resources that are required to run a device.

Windows CE contains four modules that provide the most critical features of the operating system: the kernel; the object store; the Graphics, Windowing, and Events Subsystem (GWES); and communications. Windows CE also contains additional, optional modules that support such tasks as managing installable device drivers and supporting COM.

Kernel

The kernel is the core of the OS, and is represented by the Coredll module. It provides the base operating system functionality that must be present on all devices. The kernel is responsible for memory management, process management, and certain required file management functions. It manages virtual memory, scheduling, multitasking, multithreading, and exception handling.

Most components of the Coredll module are required for any configuration of Windows CE. There are some optional kernel components, however, that are needed only when you include such operating system features as telephony, multimedia, and graphics device interface (GDI) graphics. For more information on the kernel, see the Microsoft® Windows® CE Programmer’s Guide.

Object Store

The Filesys module supports the Windows CE object store API functions. The following table shows the types of persistent storage that the object store supports.

Type of storage
Description
File system | Contains application and data files
System registry | Stores the system configuration and any other information that an application must access quickly
Windows CE database | Provides structured storage

The object store offers an alternative to storing user data and application data in files or in the registry. These various object store components can be selected or omitted during the operating system build process to include only those features that are required. For more information on the object store, see the Microsoft® Windows® CE Programmer’s Guide.

GWES

GWES is the graphical user interface between a user, your application, and the OS. GWES handles user input by translating keystrokes, stylus movements, and control selections into messages that convey information to applications and the OS. GWES handles output to the user by creating and managing the windows, graphics, and text that are displayed on display devices and printers.

Central to GWES is the window. All applications need windows in order to receive messages from the OS, even those applications created for devices that lack graphical displays. GWES provides controls, menus, dialog boxes, and resources for devices that require a graphical display. It also provides the GDI, which controls the display of text and graphics. For more information on controls, GDI, windows, and messaging, see the Microsoft® Windows® CE User Interface Services Guide.

Communications

The communications component provides support for the following communications hardware and data protocols:

  • Serial I/O support
  • Remote Access Service (RAS)
  • Transmission Control Protocol/Internet Protocol (TCP/IP)
  • Local Area Network (LAN)
  • Telephony API (TAPI)
  • Wireless Services for Windows CE

For more information on the communications component, see the Microsoft® Windows® CE Communication Services Guide.

Optional Components

In addition to the primary modules just described, other operating system modules are available. These include modules and components in the following categories:

  • Device manager and installable device drivers
  • Multimedia (sound) support module
  • COM support module
  • Windows CE Shell module

Each module or component provided in Windows CE supports a group of related API functions that are available to you.


Windows CE-Based Products

Windows CE–Based Products

Microsoft provides an entire line of Windows CE–based products ranging from tools used to develop Windows CE–based applications and device drivers to tools used to create customized versions of the OS. Additonally, Microsoft has partnered with several third-party vendors to create devices that are powered by Windows CE. These devices—the Handheld PC (H/PC), the Palm-size PC, and the Auto PC—are mobile devices that communicate with desktop computers, networks, the Internet, and each other.

For each of these devices, Microsoft provides a software development kit (SDK) to assist you in creating applications that run on the device. Each SDK contains programming libraries, header files, and source code for sample programs, and documentation that describes how to use the libraries. Each SDK also includes programming guidelines and an API reference, as well as a device driver kit. You can download these SDKs from the Windows CE Web site at http://www.microsoft.com/windowsce

The following table shows the available SDKs.

SDK
Description
Microsoft® Windows® CE Platform SDK, Handheld PC Edition, version 2.0 | A set of libraries that enable you to develop applications for an H/PC. Online documentation provides information on managing memory, communicating with other devices, designing a user interface, and programming with Microsoft® Pocket Excel and Microsoft® Pocket Word. This SDK includes a comprehensive reference and an H/PC emulator.
Microsoft® Windows® CE Platform SDK, Palm-size PC Edition | A set of libraries that enable you to develop applications for a Palm-size PC. Online documentation provides information on managing and accessing files, connecting to other devices, creating navigation and input controls, designing a user interface, and implementing sample code. This SDK includes a comprehensive reference and a Palm-size PC emulator.
Preview Release of the Microsoft® Windows® CE Platform SDK, Auto PC Edition | A set of libraries that enable you to develop applications for an Auto PC. Online documentation provides information on using system services, working with controls, implementing speech, interacting with a vehicle computer, and using position and navigation information.


Operating System Development

For the original equipment manufacturer (OEM) interested in creating a custom version of Windows CE, Microsoft offers the Microsoft® Windows CE Platform Builder. Platform Builder is a development tool that combines the Windows CE operating system with an integrated development environment (IDE) and a rich set of embedded development tools, including cross-compilers, assemblers, kernel debuggers, and remote debugging tools.

Platform Builder enables you to select Windows CE components to include in your custom OS. Although your OS can contain any combination of components, Microsoft provides eight standard configurations from which to choose. The following table shows these configurations.

Configuration
Description
Minkern | Builds a minimal version of Windows CE featuring only the core OS.
Mininput | Builds a minimal version of Windows CE featuring user input and native-driver support.
Mincomm | Builds a minimal version of Windows CE featuring serial communications and networking.
Mingdi | Builds a minimal version of Windows CE featuring graphics device interface (GDI) support.
Minwmgr | Builds a minimal version of Windows CE featuring window management.
Minshell | Builds a nearly complete version of Windows CE featuring the Task Manager and the Command Processor.
Maxall | Builds a fully configured version of Windows CE featuring communication applications.
Command processor | Builds a shell similar to Command.com in Windows 95 or Cmd.exe in Microsoft Windows NT®. This processor relies on a console driver, Condev.dll, to display text in a window.

Platform Builder includes programming guidelines, an API reference, and a device driver kit to help you create custom drivers and applications that run on your particular version of Windows CE. Platform Builder is available through standard retail channels. No additional tools or products are required to build a Windows CE–based OS.


Application Development

Microsoft provides several toolkits to assist you in developing Windows CE–based applications. These toolkits include include the Microsoft® Windows® CE Toolkit for Visual C++® 6.0 and the Microsoft® Windows® CE Toolkit for Visual Basic® 6.0. The toolkits are add-ins to the Microsoft® Visual C++® and Microsoft® Visual Basic® development systems, which means that they use the IDE used to develop desktop applications. Microsoft packages the toolkits along with emulators to enable you to develop applications on a desktop computer.

Windows CE–based devices run different versions of the Windows CE OS and therefore support different toolkits. For example, if you want to use Visual Basic to create an application for an H/PC running Handheld PC Pro Edition software, you need the following products:

  • Microsoft Visual Basic 6.0 development system
  • Microsoft Windows CE Toolkit for Visual Basic 6.0
  • Microsoft Windows CE Platform SDK, Handheld PC Edition, version 2.0

Both the development system and the toolkit are available through standard retail channels; the SDK is distributed on the Windows CE Web site.

The following table shows the toolkits that are available for each platform.

Windows CE–based devices span the home entertainment, vertical device, and PC companion markets. In the home entertainment market, products that run Windows CE include the Sega Dreamcast system, Internet set-top boxes, and Web telephones. In the vertical device market, embedded systems developers provide custom-built computers designed for special tasks, such as package and mail tracking devices, point-of-sale terminals, and navigation devices. In the PC companion market, products that run Windows CE include the H/PC, the Palm-size PC, and the Auto PC.

Each device category supports a different set of APIs. Within each device category, what is supported depends on the version of the OS that the device is built on and what modules and components are included. In addition, each device category contains a unique shell with its supporting APIs. Therefore, a Windows CE–based platform can contain APIs that are not included in the core Windows CE OS.

Additionally, Windows CE differs based on how it is ported to a device. While all H/PCs of a particular version may have the same set of functions, the functions available on a Palm-size PC differ from those on an H/PC. In addition, OEMs have the option of removing optional sections of the OS, so configuration of the OS running on a specific device can vary significantly.


Device Driver Development

Windows CE supports a wide range of device drivers that you can customize for various Windows CE–based platforms. Windows CE provides several models for device driver development, including models from other operating systems. Because of this diversity of device driver models, Windows CE accommodates almost all device types, including native devices and peripheral devices.

To assist you in creating custom device drivers, Platform Builder and all platform-specific SDKs include a device driver kit, programming guidelines, an API reference, and code samples that you can use to create device drivers for Windows CE.