New features provided by Windows Mobile 5.0 for developers (4)

Source: Internet
Author: User
Tags compact comparable
New features for developers in Windows Mobile 5.0 (4)

Windows Mobile 5.0 SDK

The Windows Mobile 5.0 SDK can be downloaded for free. It integrates Windows Mobile 5.0 developer tools into Visual Studio. The Windows Mobile 5.0 SDK provides the necessary simulators, help files, header files, and libraries to enableProgramDevelopers of Windows Mobile 5.0 can use this platform. Table 11 summarizes the benefits of installing the Windows Mobile 5.0 SDK.

Table 11. Windows Mobile 5.0 SDK features
Function Description

Windows Mobile 5.0 Simulator

Install the full set of Windows Mobile 5.0 Pocket PC and smartphone simulator images so that they can be used directly from Visual Studio.

Windows Mobile 5.0 documentation

Install the complete Windows Mobile 5.0 documentation set and integrate it into the visual studio2005 help system.

Windows Mobile 5.0 local header files and libraries

Install all the header files and libraries required by C/C ++ developers to create applications that utilize the features of Windows Mobile 5.0.

Windows Mobile 5.0 hosted assembly

Install all the hosted assemblies required by C # and Visual Basic. NET developers to create applications that can use Windows Mobile 5.0 to host APIs. These functions are available for. NET Compact Framework 1.0 and 2.0 applications.

Windows Mobile 5.0 Project

Install and register the Windows Mobile 5.0 project type in visual studio2005.

MigrateVisual studio2005

Windows Mobile 5.0 does not require developers to upgrade existing applications created with Embedded Visual C ++ 3.0, Embedded Visual C ++ 4.0, or Visual Studio. NET to Visual Studio. Applications generated using the preceding tool can continue to run on Windows Mobile 5.0. Windows Mobile 5.0 treats these applications as "legacy" applications. If you do not explicitly specify that these applications have resolution sensitivity, they will be affected by the runtime modifications to the application display discussed in the "Resolution and direction sensitivity" section in this article. These existing applications may also have library or API dependencies that require special attention from developers, and may meet strict security requirements when deployed on Windows Mobile 5.0 devices.

NoteWindows Mobile 5.0 contains important changes to the previous Windows Mobile platform, including changes to installed libraries and security models. We recommend that developers who are considering deploying or migrating existing applications to Windows Mobile 5.0 read the Windows Mobile platform migration FAQ for developers.

Although Embedded Visual C ++ 3.0, Embedded Visual C ++ 4.0, and Visual Studio. applications created by. Net can continue to run on Windows Mobile 5.0 devices, but only visual studio2005 can directly debug and deploy applications for Windows Mobile 5.0 devices or simulators.

SetEmbedded Visual C/C ++Project migrationVisual Studio

Visual Studio provides a complete set of device development tools to improve compilers and libraries provided by embedded Visual C ++ 3.0 and 4.0. These changes, as well as the differences between the Embedded Visual C ++ and visual studio2005 project files, require multiple modifications to the existing embedded Visual C ++ project migrated to visual studio2005.

These modifications include creating a new project file (possibly based on the embedded Visual C ++ project file) in visual studio2005 and adding the project header file and source file to the new project. After this is done, the differences between the compiler and the library may require changes to the project properties, and in some cases, developers may need to changeSource codeItself. In many casesCodeThe change is the result of improved C ++ standard consistency provided by the new compiler.

To simplify migration, visual studio2005 provides the Upgrade Wizard. Developers can use this wizard to convert a single project or the entire Embedded Visual C ++ workspace to a visual studio2005 solution. The wizard is automatically started by opening the original embedded Visual Project or Workspace using the standard open project feature of visual studio2005.

Use Visual studio2005 to enable the project Function

InFileMenu, pointingOpenAnd then clickProject/SOLUTION.

NoteVisual studio2005 executes the project upgrade in-place and adds the original header file and source file to the new project. We strongly recommend that you generate a backup of the embedded Visual C ++ project or workspace (including All Related Files) before starting the upgrade process.

The Upgrade Wizard executes the following tasks:

Create a new visual studio2005 project; or, create a new visual studio2005 solution when migrating the workspace.

If the Wizard is to convert the workspace, all workspace projects are added to the new solution as visual studio2005 projects.

Add all project files to their respective projects.

Map all project properties and settings to their Visual Studio equivalent content.

Maps any rejected platform or architecture of the original project to an equivalent platform or architecture.

The Upgrade Wizard is designed to upgrade the project and workspace-the Upgrade Wizard does not make any changes to the source code. After the Upgrade Wizard is complete, the next step is to compile the code and correct any compilation problems.

NoteMigrating Microsoft Embedded Visual C ++ projects to Visual Studio 2 provides detailed descriptions of the migration process and a list of common migration problems. It is strongly recommended that developers refer to this document when performing the first upgrade from Embedded Visual C ++ to visual studio2005.

SetVisual studio2003Project migrationVisual studio2005

The managed developers who migrate the project or solution from Visual Studio. net2003 to visual studio2005 should find that the process was quite smooth. Visual studio2005 provides the Upgrade Wizard to automatically convert project settings to the equivalent values in visual studio2005. It also automatically adds the project source file to the project you just created. The Upgrade Wizard does not make any changes to the source code file. It is strongly recommended that developers back up the entire project or solution, including all the files contained, before performing the upgrade.

We strongly recommend that you. developers who migrate net2003 to visual studio2005 and those who intend to migrate to Windows Mobile 5.0 read the Windows Mobile platform migration FAQ for developers, some platform changes may affect the ability of applications to install and run on Windows Mobile 5.0 devices.

Remote tools

In order to develop device applications efficiently, developers often need to interact with the target device. Many common tasks that developers execute during application development (such as viewing the file system or modifying the Registry) may not be executed directly on the device. To simplify these tasks and other device management and monitoring tasks, visual studio2005 provides remote tools.

Visual Studio remote tools are a set of desktop computer utilities that provide common device monitoring and management functions. Table 12 shows the visual studio2005 remote tool. By using these tools, developers can achieve simplicity and efficiency comparable to their desktop computers when monitoring and managing devices or simulators. These tools are similar to the remote tools included in Embedded Visual C ++. However, Visual Studio is the first program that provides these utilities to both local and hosted developers.

Table 12. Visual studio2005 remote Tool
Remote tools Description

Remote File Viewer

Used to view and interact with devices or simulator file systems, including copying files between devices and desktops (see figure 14 ).

Remote Heap Walker

Analyzes the heap layout and memory content of a device or simulator process.

Remote Process Viewer

Used to view detailed thread and DLL information about the device or simulator process (see figure 15 ). It can also be used to end the process of a device or simulator.

Remote Registry Editor

Used to view and modify the registry of a device or simulator.

Remote spy

This interface is used to view the Windows list of processes running on a device or simulator, including detailed information about the window handle and received window messages.

Remote zoom in

Used to capture device or simulator screen snapshots. (You can enlarge the screen snapshot or save the screen snapshot as a bitmap .)

Figure14. Visual studio2005 Remote File Viewer

Figure15. Visual studio2005 remote process viewer.

Local compilers and libraries

Visual Studio provides many important enhancements for local developers. These enhancements include compilers, standard C libraries, MFC, and ATL. In addition to providing improved application quality, these enhanced versions are more comparable to their desktop computer components-They further improve developers' ability to share code and skills between desktop computer and device application development.

Compiler

Visual Studio provides a complete set of new device cross compilers that support the arm, MIPS, sh, and x86 platforms to local device developers. These compilers have been completely reconstructed with the new compiler front-end (based on the latest desktop computer compiler.

Common Front-end architectures provide greater compiler behavior consistency between desktop computers and devices, making it easier for developers to migrate application code and their skills. Developers who switch to device development can also protect existing code investment and minimize their learning curve. Because the front-end of the new compiler is based on the desktop compiler, many desktop compiler functions are now integrated into the device compiler.

Because the desktop compiler function is integrated, the device compiler can provide many optimization improvements that were previously unavailable. In addition to compiler optimization, device developers have also gained the benefits of code generation in the connection era. In the connection era, code generation has become an opportunity for applications to perform greater optimization than just executing Compiler optimization, because the optimization can be performed across compilation modules (*. BIN file), so as to have the opportunity to optimize the program as a whole.

Compiler improvements are not limited to code optimization. Because the device compiler uses the desktop computer compiler, it can now merge many functions previously limited to the desktop computer. For example, the device compiler now provides a higher level of C/C ++ standard consistency. Similarly, the device compiler can now provide significantly enhanced Unicode support.

Library

In addition to the updated compiler, visual studio2005 also provides the updated version of the Library, including the standard C ++ library 8.0 (SCL) and standard template library 8.0 (STL) microsoft basic class 8.0 (MFC) and Active Template Library 8.0 (ATL ). Like the compiler, all the above databases have been updated and are now based on their desktop computer components. Although based on the corresponding desktop computer library, each device implementation is a subset of desktop computer implementation. This subset is based on the size, performance, availability of basic operating system functions, and platform adaptability.

Using the new library based on their desktop computers provides many benefits for device developers. The most obvious advantage is that application code is now more portable, because the desktop and device versions of the library have higher compatibility. This portability also applies to developers' skills. In the past, some desktop computer libraries were more stable than the corresponding devices. The updated library now provides the highest quality available implementations for device developers.

For developers who use MFC or ATL, remember that the windows mobile 5.0 device is attached with the MFC 3.0 and ATL 4.0 installed in the Rom. Developers using the new update library MFC 8.0 and ATL 8.0 must ensure that version 8.0 libraries are statically linked to their applications, or that version 8.0 DLL is included in their application installation.

NoteFor more information, see what's new in Visual Studio 2005 for native developers.

Back to Top

Other windows mobile 5.0 changes that affect developers

In addition to the tools and APIs discussed, Windows Mobile 5.0 also provides many improvements. The following table provides an overview of some additional Windows Mobile 5.0 features.

RomSoftware provided in

Table 13 shows some key developer libraries, controls, and runtime libraries provided in the ROM of all windows mobile 5.0 devices. Any libraries, controls, or runtime libraries required by the application and not listed in the table must be explicitly installed on the target device. Note that Windows Mobile 5.0 Rom is not provided. NET Compact Framework 2.0, SQL mobile2005, MFC 8.0, and ATL 8.0, so you must install them (or, for MFC 8.0 and ATL 8.0, You Can statically link them to your program ).

Table 13. Libraries, controls, and runtime libraries in Windows Mobile 5.0 Rom
. NET Compact framewor.1.0 SP3 Contact selection Dialog

MFC 3.0 and ATL 4.0

Windows Media 10 OCX

State and notification Broker

Managed Telephony

DirectShow

Managed outlook mobile

Direct3d mobile

Managed messaging

DirectDraw

Managed Configuration Manager

Picture selection Dialog

GPS API

Resolution and direction sensitivity

Windows Mobile 5.0 supports multiple screen sizes and orientations (including portrait, landscape, and square ). All applications for Windows Mobile 5.0 are marked as screen resolution and orientation sensitivity. Therefore, a very important problem for developers is that, design and validate applications to work effectively at various screen resolutions and directions. In addition to verifying support for different resolutions and directions, developers should also prepare the application for any changes to the device direction during the lifetime of the application, because many windows mobile 5.0 devices support dynamic changes between portrait and landscape.

For managed developers, the best way to prepare for processing different screen resolutions and directions is usually by using managed controlsDockAndAnchorAttribute. Managed applications automatically resize each application form to match the screen layout of the current device. When you change the screen direction of a device while the application is running, all application forms are automatically redirected to match the new screen layout. UseDockAndAnchorProperty. When any form layout changes, all form controls are automatically relocated.

For local developers, visual studio2005Deviceresolutionaware. hMany helper functions are provided to simplify the process of making the application have resolution and direction sensitivity. By using the provided helper function, developers can design applications to query the current direction, scale graphical resources, and modify the current dialog box layout with resources that are more suitable for the current screen layout. Table 14 lists some of these functions.

Table 14. Native functions for Screen Resolution and direction management
Function Description

DRA: getdisplaymode

check whether the current configuration is vertical, horizontal, or square.

DRA: relayoutdialog

modify the dialog box layout to match the specified dialog box resources.

DRA: stretchicon/DRA: stretchbitmap

stretch the icon or bitmap to the specified size.

DRA: imagelist_loadimage

creates an image list based on the specified bitmap, automatically scales the image to adapt to the differences between the bitmap and the screen DPI (points per inch) value.

Whether developers use managed development tools or local development tools, developers should prepare all windows mobile 5.0 applications to adapt to all supported screen sizes and directions. By using the simulator included with the Windows Mobile 5.0 SDK, developers can easily verify the appearance and behavior of the application because the provided simulator represents all possible windows mobile 5.0 screen la S.

Windows Mobile 5.0 will continue to run existing applications that may not be screen sensitive. When the application is targeting a lower resolution than the one supported by the device, Windows Mobile 5.0 automatically doubles the pixels and scales the application to match the display of the device. If the device direction causes some parts of the application to be cut off, Windows Mobile 5.0 automatically adds a scroll bar to allow users to scroll and view the rest of the screen.

Pocket PCSoft key

Windows Mobile 5.0 introduces a soft key for the Pocket PC. As shown in Figure 16, the soft keys can be modified by the application. They appear at the bottom of the screen and are associated with the hard keys at the front and bottom of the screen. Softkeys have existed since the initial release of smartphone and have become a valuable tool for user productivity. On a Pocket PC, soft keys can avoid the need to use pen pointers because they allow users to interact with applications by using only one hand.

Figure16. Windows Mobile 5.0 Pocket PCSoft key.

Adding a smart key to an application is as easy as designing a menu. When designing an application, create a menu with only two options. When this application is executed, Windows Mobile 5.0 maps each menu option to a soft key. Windows Mobile 5.0 automatically provides this behavior for any application that contains one or two options. Menus that contain more than two options are displayed as traditional menus.

Persistent storage Zone

Windows Mobile 5.0 protects all data and applications from power loss. Because Windows Mobile 5.0 loads the entire file system and registry into a persistent storage area (instead of using RAM, windows Mobile 5.0 provides a reliable storage platform for both users and applications-even in the absence of battery power.

The persistent storage zone provides a reliable storage system for application developers, which is fully implemented through standard file systems and registry APIs. The persistent storage area is optimized for large read/write operations. Therefore, the performance of applications that read and write large data blocks often exceeds those that read and write small data blocks.

EDB

To improve application performance and long-term portability, The CEDB Object Storage zone has been replaced by EDB. EDB utilizes the storage subsystem used by SQL mobile and provides performance significantly better than CEDB (especially when used together with persistent storage ). Porting an application from CEDB to EDB has the least impact, because CEDB provides the same function set as CEDB-all functions have the same name and parameter list.

Pocket PCApplication Security

To help users and enterprises protect the integrity of their Pocket PC devices, Windows Mobile 5.0 introduces the certificate-based application security model used by smartphone to the Pocket PC. With this application security model, Windows Mobile 5.0 devices rely on digital code signatures to verify that any application installed on the device does come from the source it claims, no one has modified the application before the user installed it on the device.

By default, when you start a new application installation on the Windows Mobile 5.0 Pocket PC, the device checks whether the application has been digitally signed with a certificate from the received source. If the device determines that the application comes from the receiving source, it will install the application. If the application is not signed or the certificate signature from a known trusted source is not used, the device prompts the user to confirm whether the installation should continue. This model enables users to have full control over which applications are installed on their devices.

For enterprises that want to strictly control their applications installed on Enterprise devices, they can modify the default model. In this solution, enterprises can remove the default list of received sources and install their own lists. In addition, enterprises can disable the option of prompting users when the application is not signed or from an unknown source. After the enterprise disables this option, you can only install applications that are considered by the enterprise to be signed by one of the sources. This model significantly improves the stability and reliability of Enterprise devices because it eliminates problems and support problems caused by users' personal software installation.

Pocket PCAndSmartphoneShared publicCabFormat

Windows Mobile 5.0 software for Pocket PC and smartphone shares a common cab format. Sharing a common cab file format significantly reduces the time required to create a cab file and support the installation process, because all devices are installed using a single cab.

ActiveSync

One of the key considerations in any mobile device application is how to synchronize data on the device with data on a desktop computer or backend server. For many applications, the answer is ActiveSync because it provides end-to-end data synchronization solutions for Windows Mobile devices. For Windows Mobile 5.0, ActiveSync incorporates many enhancements to provide a higher quality and more reliable synchronization experience.

ImprovedUSB 2.0Supported

Although ActiveSync provides many connection options (including Bluetooth, infrared, and serial ports), most developers use USB 2.0. The ActiveSync USB driver has been completely restructured to improve the ActiveSync experience when a developer connects through a USB 2.0 connection. These new drivers now take full advantage of the functionality and performance of the USB 2.0 hardware. In addition, these new drivers can now work more effectively with desktop computer network services. These new drivers, coupled with their better cooperation with desktop network services, have significantly improved synchronization throughput.

Improved Multi-partnership management

In addition to the existing support for devices that work with multiple desktop computers, ActiveSync also improves the management of partnerships. Currently, ActiveSync supports working with both desktop computers and servers. ActiveSync also has a re-built logic for detecting conflicts between partnerships. This new logic is more effective in detecting conflicts, significantly reducing repeated information between cooperation relationships.

ImprovedExchangeSynchronization

One of the key points of updating ActiveSync is to improve the overall user experience when synchronizing devices with exchange. These updates have led to several key changes. One of the most significant changes is the improved connection reliability during synchronization with exchange. This improvement not only produces more successful initial connections, but also reduces the number of dropped or incomplete connections. These changes also improve the synchronization continuity between the direct synchronization with the Exchange server and the connection to the exchange Synchronization Through the desktop computer. These Synchronization Methods now provide identical synchronization behaviors and results.

ActiveSync now provides a more complete exchange synchronization experience. In addition to long-term support for appointment, contact, and calendar synchronization, ActiveSync now supports synchronization tasks. As part of a more complete experience, ActiveSync is now able to synchronize other outlook attributes. The most noteworthy is that it can now synchronize images contained as part of a contact.

Improved security

In addition to enhancing functions, ActiveSync also includes many security enhancement features. These enhancements are the result of a rigorous security review designed to better protect you, your devices, data, and desktop computers. A critical security change is to remove remote synchronization. In earlier versions, remote synchronization allows devices to synchronize data through WiFi connections. After review, this feature is considered to be insufficient for security and has been removed.

Rapi

Windows Mobile Remote API (rapi) is a series of functions used to manage and control connected devices and interact with them from a desktop computer. In addition to supporting long-standing C-style rapi, Windows Mobile 5.0 also provides a new COM-based implementation. The new com-based rapi provides a key architecture transformation from the existing C-style implementation. Unlike the C-style rapi that assumes that a windows mobile device is connected to a desktop computer, the com-based rapi is designed to support multiple devices connected to the desktop computer at the same time and interact with them.

It must be noted that Windows Mobile 5.0 still only supports connecting a single device to a desktop computer-it does not support multiple devices connected at the same time. However, in the future, Windows Mobile may support connecting multiple Windows Mobile devices to a single desktop computer at the same time.

Although writing an application to use a new COM-based rapi will be restricted to interacting with a single connected Windows Mobile 5.0 device, however, these applications are ready to interact with multiple connected devices after the corresponding functions are added to future Windows Mobile devices. We recommend that all newly created rapi applications for Windows Mobile 5.0 use the com-based rapi. Table 15 shows three main rapi com interfaces.

Table 14. Main rapi com interfaces
interface description

irapidesktop

represents the current desktop computer. Lists connected devices, searches for specific devices, and monitors for new connections.

irapidevice

indicates the connected device. Allows you to query a device, determine the device connection type, and initiate an rapi session with the device.

irapisession

indicates the rapi session with a specific connected device. This interface is used to perform actual device interaction.

Windows Media Player

Windows Media Player provides users with a rich multimedia experience, which also provides high-quality support for audio and video playback. Windows Mobile 5.0 exposes Windows Media Player to ocx, providing these features to application developers who want to merge multimedia playback capabilities into their applications. With Windows Media ocx, developers can manage the playlist, enumerated content, streaming content, and control the playback quality. Figure 17 shows the Windows Media Player Library and music playback screens.

Figure17. Windows Media Player 10 LibraryAndMusic playbackScreen.

Back to Top

Summary

Windows Mobile 5.0 allows developers to easily take advantage of the power of modern mobile devices. Together with managed APIs, the powerful native provides developers with an easy-to-use and efficient development platform. The high continuity between classes and libraries and their corresponding desktop computer components and the unified development environment provided by visual studio2005 jointly improve the efficiency of developers, in addition, developers can make more effective use of their skills and code investment.

Windows Mobile 5.0 is the most powerful available mobile device platform. While enabling developers to continue to improve and maximize their core skill sets, windows Mobile 5.0 and visual studio2005 jointly enable developers to create more powerful and easy-to-use applications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.