What Is Windows CE?

Windows CE is simply a 32-bit, non-PC operating system. You might have seen Windows CE devices, such as the handheld PC (HPC) or the palm-sized PC—these are just some of the many applications run by the Windows CE operating system. So, although this chapter devotes much time to writing applications for the HPC, it is important to realize that these devices are only a small subset of Windows CE applications. Windows CE is designed to be a component-based operating system that can be embedded into any number of devices. Being supplied as a series of configurable components allows Windows CE to meet the stringent memory and size constraints common to many electronic devices.

If you were to compare the number of Microsoft Windows NT and Microsoft Windows 9x machines with the number of 32-bit operating systems throughout the world, you might be surprised to find that Microsoft comprises only a small percentage of the market. Windows CE is Microsoft's attempt to claim a larger percentage of the 32-bit operating system market. One of Microsoft's goals is to have the Windows CE operating system embedded into devices ranging from industrial control systems to everyday consumer devices. Bill Gates recently said at a TechEd conference: "Although Windows 98 is the big thing today, I do expect that two years from now Windows NT and Windows CE volume will be as great, or greater than, Windows 98 volume."

The Windows 9x operating systems at present outsell Windows NT and Windows CE. If Bill Gates' instincts are proven correct, the picture might look drastically different in the year 2000.

Peet Morris, director of The Mandelbrot Set (International) Limited (TMS) and one of the authors of this book, also has high hopes for the future of Windows CE. Peet's view of Windows CE is summed up by the following statement:

"I think that Windows CE is, and will become more and more, a key technology for our industry. It presents a fantastic new opportunity for developing great software and presents a new, almost unique set of challenges for developers worldwide. As the Technical Director of TMS, I'm determined that we will be a leading provider of both Windows CE-based solutions and, for the developer, the tools and technologies required to fully exploit the opportunity Windows CE presents."

The amount of interest being shown by both the electronics and developer communities is a sure sign that Windows CE is here to stay and that it will have a large impact in the marketplace. I said earlier that Windows CE is a non-PC operating system. At the time of this writing it is already possible to buy palm-sized PCs running Windows 95 with lots of memory and disk space. For programmers looking to implement applications comparable to those on the desktop, however, Windows CE is probably not the best choice of operating systems.

Target Audience

The Windows CE operating system is specifically targeted at independent hardware vendors (IHVs) and original equipment manufacturers (OEMs). Windows NT and Windows 9x are available as software packages that can be installed on a computer; however, Windows CE is designed to reside in read-only memory (ROM). It is therefore not possible for a software developer to simply buy the operating system, install it, and write software for it. The uses of Windows CE are almost unlimited in scope in the OEM and IHV markets, although some types of applications will depend on enhancements being made to the operating system even as I write.

Consider a domestic electronic device that you have at home or in your office. Chances are that the product uses custom hardware and an operating system with the code written in either assembly language or C/C++. The manufacturers might design and build their own hardware or they might buy components upon which they build. Whichever method is used to build the product, more than likely the processor has been designed specifically for the task it performs. Any change to the product's features might well involve changes to the processor unit—in short, increasing the development time and costs.

Windows CE offers the ability for a manufacturer to buy a fully customizable operating system that is based on the Microsoft Win32 API. A large base of Win32 programmers already exists; therefore, the task of programming a Windows CE device becomes that much easier. Another benefit is the amount of training and support that is available. However, the real benefits can be better understood if you consider the additional functionality available as part of the operating system.

I mentioned that Windows CE offers the ability to build a device that can be programmed using the Win32 API and standard tools like Microsoft Visual C++. However, these capabilities by themselves probably would not be enough incentive to persuade the electronics industry to switch to Windows CE. Bear in mind that the operating system is licensed and the cost of the license fee depends on configuration and volume. OEMs are used to building their own hardware and maybe even writing their own operating systems. The real incentive for using Windows CE lies in the additional components, listed below:

  • Transmission Control Protocol/Internet Protocol (TCP/IP), Point-to-Point Protocol (PPP), and Telephony API (TAPI) components offer the ability to communicate using industry standard protocols. Using these communications components, the vendor can build support for the Internet and intranets in the same way that Windows programmers do. HTML support is also a feature of the operating system. Even for an OEM, the time and costs required to build these components from scratch would more than likely be prohibitive, because the development cost would price the device out of the market.

  • IrDA is the infrared port communications protocol. Again, using standard programming techniques, the vendor can support infrared communication of complex data. This will be a popular form of communication for devices that are in mobile locations. For example, a telephone device installed in a vehicle will need some means of receiving updates to its software or data. A typical scenario might be a user downloading his or her PC contacts file onto a handheld device, and then transmitting the data from the handheld device to the telephone using an infrared link. The telephone also serves as an example of how much potential this technology has. For example, it is feasible that a Windows CE telephone could update new software via a telephone call from the desktop—wow! (Not "Windows On Windows."<g>)

  • As most Windows CE machines don't have any disk storage available to them, the object store provides intrinsic data storage methods as part of the operating system. This is covered in more detail later in this chapter; however, the object store essentially provides database, Registry, and file system functionality. The object store is accessible via the Win32 API, so utilizing this functionality is purely a software task—the vendor does not need to build any additional hardware. I should mention at this point that the Windows CE database is not a relational database—it's an indexed sequential access method (ISAM) database, meaning it allows storage of a number of fields indexed on up to four keys. Any record might contain any data in its fields, and might contain any number of fields.

    Microsoft Visual Basic, Java, and Microsoft Foundation Class run times can be incorporated into the operating system by the device manufacturer. These components are available for purchase when you buy the Windows CE license. Devices built with these components have the added advantage that the components reside, and are executed, in ROM. This is a big bonus, because, for example, the Visual Basic run time is around 600 KB in size. A Visual Basic program would not require these components to be installed again, thereby leaving more memory for the application. Corporate buyers should make note of this point, because whether these run-time components are included in the operating system is purely the manufacturer's decision. If you will be developing applications requiring any of these run times, it might pay to invest in a device with the required components built in.

    COM objects are supported by Windows CE, although at present they can be created using only C++ and must be in-process DLLs. This means that for the time being it is not possible to build Distributed COM (DCOM) objects. It is important to remember that Windows CE is a fairly new technology. Although the Windows CE desktop systems are largely compatible with the Windows 9x/NT systems, the underlying code is totally new and is optimized for the Windows CE environment. This is one of the reasons why some of the tools available have limited functionality. However, Microsoft is listening carefully to its users, so you can expect these tools to become more powerful over time.

  • In addition to the language support, Microsoft Internet Explorer can also be an integral part of the operating system. This is an invaluable addition for Web-enabled devices. I would imagine that a vast number of Windows CE devices will be Web-enabled—WebTV is just one example. Again, imagine having to write your own Web functionality totally from scratch! The scope of devices using World Wide Web features is limited only to the imagination.

Now that I've described all the benefits, it is probably easier to comprehend just what Windows CE has to offer. Indeed, the amount of interest being shown by the electronics industry is proof of its potential. The potential market for Windows CE devices is enormous. Based on the history of the electronics industry over the last decade, it might be safe to assume that as the Windows CE operating system is enhanced over time, more diverse applications will be developed to solve problems we experience today. Some solutions might stretch the Windows CE architecture to its limits, performing tasks that we would not have believed possible. At the moment, Microsoft envisions that Windows CE will be best suited to the three main categories of product shown in Figure 5-1.

Microsoft has divided its support for the application of Windows CE into two areas: semi-targeted products and targeted products. Essentially, for semi-targeted products, Microsoft will work with OEMs and IHVs to produce custom components for a specific purpose (for example, writing device drivers). For targeted products, Microsoft will make enhancements to the operating system itself to support features required by certain types of application. One example of a targeted product is the HPC, where the operating system has built-in support for most of the features it requires.

click to view at full size.

Figure 5-1 The main Windows CE product categories and typical usage

Building a Windows CE Device

Hardware vendors are generally very good at what they do, maybe because of the skills they need to produce a piece of equipment that meets the tough demands of consumer laws. When, for example, was the last time you bought a car with a bug in the electronic ignition system? OK, so you might not know if the car did have one, but compare that to the average software application! With this degree of technical ability, the average IHV or OEM will easily be able to build high-quality devices using Windows CE.

Windows CE is purchased as a set of files containing the operating system binaries—the exact content is decided by the purchaser. The Windows CE Kernel module is a mandatory requirement of the operating system; however, all other components are optional. For example, if you were building a control module for an alarm system, you might want to have a custom LCD display, in which case you would purchase Windows CE without the Graphics Device Interface (GDI) module and simply add your own. You get the Microsoft Windows CE Embedded Toolkit for Visual C++ 5 (ETK) along with the operating system. This toolkit allows you to build device drivers that interface your hardware to Windows CE and customize the operating system. (See Figure 5-2.)

click to view at full size.

Figure 5-2 Windows CE is available in various configurations to match the user's needs

In the early days of PC software development, a major consideration was that of processor speed and disk space. As hardware has evolved, the cost of high-speed CPUs, RAM, and disk storage has plummeted, in many cases reducing the need for programmers to spend time developing code that conserves these resources—the average corporate desktop PC will usually have adequate memory and disk space to run the application. Windows makes things even easier with its virtual memory management. However, the story is very different for OEM and IHV developers. In a custom device, physical space might well be at a premium. More importantly, hardware like CPUs, ROM, RAM, and disks all consume power, which is limited in a portable device. This makes the manufacturer's task a difficult one. For example, a color display might be a nice thing to have, but you might have to cut back elsewhere so that the poor battery will last a reasonable time. (Remember the first portable phones with their enormous battery packs?) This is the reason that the Windows CE operating system is vastly reduced in size from the PC and server operating systems, and it is also why the operating system is available in component form. By including only the required functionality, the manufacturer can keep the ROM requirement small, which allows more RAM for the user.

Having purchased the Windows CE license, you now want to build and test your device. You can select a Windows CE configuration with as many or as few components as you require. For example, if you want telephony support you might choose to purchase a license that includes the TAPI module. The more components you choose, the easier it will be to build your device because much of the work will already have been done. After selecting the operating system components, the vendor must build any drivers that will interface to the device hardware. In addition, the vendor must write any vendor-specific software. For example, not all devices need to have a video display unit (VDU)/keyboard interface; a Windows CE stereo system might have a custom plasma display with a button panel. In instances like this, the vendor might need to write his or her own components—in this case a replacement GDI module and hardware drivers. The Windows CE Embedded Toolkit for Visual C++ 5 provides all the necessary support for building and testing device drivers and customizing the operating system. Once the software is written, the next step is to burn an erasable programmable read-only memory (EPROM) chip for testing. The EPROM contains the user-configured Windows CE operating system in addition to the device's software. Having the software in ROM does not prevent additional software from being loaded into RAM, but RAM software is lost should power fail. However, an advantage to having software in RAM is that it makes upgrading a much easier task. Once the device has been tested and debugged, the "real" system CPUs can be produced for the finished device. For an OEM or IHV, producing a Windows CE device should be reasonably straightforward; in many cases, it should be an easier task than at present once the OEM or IHV has mastered the intricacies of the Win32 API and Windows CE configuration.

It is easy to draw false impressions about the capabilities of the Windows CE operating system, especially if you focus too much on devices like the HPC. Consider the screen display as a prime example. When I first started to look at Windows CE seriously, I thought the operating system was bound to a miniature device that had to have a tiny screen display. In fact, nothing could be further from the truth—the Windows CE device can be of any size and can also incorporate a screen display of virtually any size.

Peripheral devices, of which I predict a weird and wonderful selection, will be designed primarily for a specific task. Windows CE allows flexibility for this specific design; for example, the operating system can support a screen resolution of 1600 x 1200 and device drivers can be built if the default does not meet a particular requirement. If I could emphasize one Windows CE concept, it is that Windows CE is a flexible and adaptable compact operating system.

Windows CE has matured somewhat over the last year or so and, as with any good product, a whole plethora of support tools and services are now available to both the OEM and software developer.



Ltd Mandelbrot Set International Advanced Microsoft Visual Basics 6. 0
Advanced Microsoft Visual Basic (Mps)
ISBN: 1572318937
EAN: 2147483647
Year: 1997
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net