eMbedded Visual C11 3.0

< BACK  NEXT >
[oR]

In the past, Microsoft has provided add-ins for Visual C++ to provide a Windows CE development environment. The main problem with the add-ins was that all the facilities used for developing Windows NT/98/2000 applications were still present. Also, tools like the dialog editor were not tailored to writing Windows CE applications. The documentation was difficult to follow Windows CE-specific comments were embedded in the full MSDN documentationset.

eMbedded Visual C++ 3.0 (Figure 1.1) is a new tool specifically designed to write Windows CE applications. It is based on Visual C++ and shares the same user interface, but only those tools and facilities necessary for writing Windows CE applications are present. The "WCE Configuration" toolbar provides drop-down combo boxes that allow selection of the target platform (for example, Pocket PC, Palm size PC 2.11, or H/PC Pro 2.11); the target CPU (such as ARM and MIPS); whether the build is debug or release; and the type of device to be run on (for example, emulation or a target device).

Figure 1.1. eMbedded Visual C++
graphics/01fig01.gif

The documentation is specific to writing for Windows CE and details carefully how the various functions are implemented in the various operating system and platform versions. Figure 1.2 shows a typical example for the Sleep function.

Figure 1.2. Typical help screen for a Windows CE function
graphics/01fig02.gif

eMbedded Visual C++ allows you to write Windows CE application for any target device for which you have an SDK (Software Development Kit). As well as producing a customized Windows CE operating system, the Microsoft Platform Builder can also produce an SDK for that device. The SDK can then be installed in eMbedded Visual C++ and applications can be developed for the device.

Most of the sample projects covered in this book and distributed on the CDROM are eMbedded Visual C++ projects, and should not be compiled using the standard Visual C++. Workspaces in eMbedded Visual C++ use the .vcw extension, and projects the .vcp extension. In Visual C++ .dsw and .dsp are used. eMbedded Visual C++ can import Windows CE projects created using Visual C++. However, in my experience it is sometimes better to rebuild the project and import the files.

Common Executable Format (CEF)

One of the downsides to writing Windows CE applications in the past was the number of different microprocessors that needed to be supported, such as MIPS and SH3. Starting with Pocket PC, Windows CE devices now support a processor-neutral machine code set called Common Executable Format, or CEF (pronounced "keff"). You can compile into CEF using eMbedded Visual C++ and then run that single executable on any platform that supports CEF, such as PocketPC.

CEF-enabled platforms have a translator that takes the CEF code and translates it into the native code, such as MIPS or SH3. Translation can take place every time the application is run, or the converted code can be saved. There is an overhead in performance CEF applications run at around 80 percent the speed of native applications.

Emulation Environments

Many Windows CE SDKs, such as Pocket PC, support an emulation environment that runs on the desktop PC. This can be used to test and debug your applications and is generally quicker to use than downloading applications onto a real device. However, you should not solely rely on emulation for testing for the following reasons:

  • Emulation is not perfect, and applications that run under emulation may not work correctly on a proper device. Facilities such as networking and RAS dialup connections may behave differently.

  • User interfaces may appear differently under emulation, since there are differences in how standard controls and fonts are implemented.

  • Desktop performance is generally much better than on a real device. Applications may perform adequately under emulation, but run too slowly on a Windows CE device.

Using emulation does save large amounts of development time, particularly when you are debugging non-user-interface code.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

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