The decision should be based on whether you have existingWin32/MFC/C#/VB code, the type of code you're writing(drivers, real-time, application), the overall size of youroperating system image once the application and runtimehave been included, the speed of development of theapplication, and other considerations such as security andportability. You can mix and match the code depending onwhich layer of the project you are working on: Win32 fordrivers, Win32, MFC, or C#/VB for the end user application.The overall take away is that application developers reallycan use their desktop knowledge to be immediatelyproductive with Windows CE.

Agenda

Tools and technology

Common application develop steps

Windows CE feature programming

Windows Mobile Development

Pocket PC

Smartphone

Emulator overview

Common ApplicationDevelop steps:

1.Get an SDK for specified Windows CEplatform.

2.Writing Code and debug underWindows CE Emulator.

3.Make release build and run it on realtarget device, if necessary debug theapp on device usingActiveSync.

Step1 : Get an SDK

SDK is used by EVC and Visual Studioto develop Apps

Two ways of getting SDK

Provided by Microsoft or 3rd party vendor

Export SDK for our own platform

Microsoft Provides:

Standard SDK (Common SDK dev)

Windows Mobile SDK (Pocket PC…)

Export SDK Wizard in PB

A tool that creates and exports a softwaredevelopment kit (SDK) based on a particularcustomized platform. The exported SDK is aset of headers, libraries, run-time files,platform extensions, and Help documentation.Application developers can use the SDK inconjunction with Microsoft eMbedded VisualC++ 4.0 or Microsoft Visual Studio .NET towrite applications for a custom platform.

•

Platform-> Configure SDK

•

Platform-> Build SDK

Relationship between PB, yourSDK and Dev tools

Demo:

Export SDK from PB anduse it in EVC

Tips :

Use your own SDK only if StandardSDK is not suitable.

UsePlatform->Configure

SDK fordetailed SDK configuration.

Uninstall SDK from Control Panel.

Step 2 : Coding and Debug underEmulator

Similar with Visual C++ 6.0 and VisualC++ .NET

Leverage your Windows Programmingknowledge

Platform Manager

A communications technology thatmanages thecommunications

between a development workstation anda CE target device. Platform Manager allows developmenttools to download and connect to the target device in amedia-independent manner. PB, EVC 4.0, and theMicrosoft .NET Compact Framework use PlatformManager to download files such as applications, MicrosoftActiveX controls, run times, and remote-tool clients to thetarget device.

Workstation

CE Device

TCP / IP

KITL

ActiveSync

Platform Manager

Remote Tools

You can use a developmentworkstation to remotely perform avariety of programming tasks on targetdevice.

Provides profiling and analysis tools within a graphicaluser interface (GUI) that enable you to identifyalgorithmic bottlenecks in your applications.

Remote File Viewer

Displays a hierarchical view of the file system on atarget device.

Remote Heap Walker

Displays information about heap identifiers and flagsfor processes that are running on a target device.

Remote Kernel Tracker

Displays a representation of the execution of theoperating system (OS) on a target device.

Remote Performance Monitor

Measures the performance of a target device.

Remote Process Viewer

Displays a list of processes and threads running on atarget device.

Remote Registry Editor

Displays the registry for a target device and enablesyou to manage the registry.

Remote Spy

Displays a list of windows opened on a target deviceand messages generated by those windows.

Remote System Information

Displays system settings and properties for a targetdevice.

Remote Zoom-in

Displays an image from the screen of a target device.

Demo :

EVC Hello World andRemote tools

Step 3 : Release, run and debugon target device

Make release build according to theCPU on the target device

Transport the executables onto thetarget device or build it into the OSimage and run on the device

Perform step by step debug withActiveSync if necessary.

Introduction to ActiveSync

ActiveSync provides support for synchronizing data betweena Windows-based desktop computer and Windows CE .NETbased portable devices. Using time stamps and userpreferences, the synchronization process tracks datachanges on both computers, then transfers the appropriatedata so that each machine has the most-recent versions.Outdated or unwanted data is discarded.

An interface that enables an applicationrunning on a desktop computer to makefunction calls on a Windows CE-baseddevice. The desktop computer is knownas the RAPI client and the Windows CE-based device is known as the RAPI server.RAPI runs over Winsock and TCP/IP.

Windows Mobile extends the familiarityof the Windows desktop to personaldevices.

Windows Mobile Family

Pocket PC

Smartphone

Windows Automotive

Smartphone

Pocket PC

Why Windows Mobile

The market for mobile devices isgetting larger and larger

By 2008, there will be over 100 millionconverged devices and 2 billion mobilephone subscribers (IDC, 2004).

Pocket PC is already the 1st

in PDAmarket

Smartphone is growing rapidly

Windows Mobile Feature

Microsoft provides the Platform andSDK

OEMs provide the hardware

Developer can NOT modify thePlatform features

Windows Mobile Develop

Step1 : download & Install SDKs

URL:

http://msdn.microsoft.com/mobility/downloads/sdks/default.aspx

SDK can be used by both EVC andVisual Studio.NET 2003

Windows Mobile Develop

Step2 : Develop, Debug and Run

Reference to previous slides

You need to know.

1. use ONLY Unicode

char set

a. ANSI is one byte, UNICODE is two

b.

declaration：

CHAR->WCHAR

or TCHAR

c. string function：

strlen( )->wcslen( )

strcmp( )-> wcscmp( )

You need to know (2)

2. Pay attention to memory usage

Decrease the number of static and globalvariables.

Pay great attention on function recursion

Notice the size of picture, sound…

Check after dynamic memory allocation

You need to know (3)

3. Check the screen resolution

620×240、240×320 ….

Screen resolution sample

Where are we?

Get platform & SDKfrom OEMs

Coding & Testing

Release toManufacture

Export your SDK

Agenda

Tools and technology

Common application develop steps

Windows CE feature programming

Windows Mobile Development

Pocket PC

Smartphone

Emulator overview

Overview

The Emulator is a tool that mimics thebehavior of hardware that supports aWindows CE–based platform.

With the Emulator, you can design andbuild a Windows CE–based platform andtest it using software that mimicshardware rather than testing the platformon hardware.

Use software to emulate hardware.

Related software

Microsoft Virtual PC

VMWare

Share sourced Bochs

Usage Scenarios

Platform Developer

DMA support

Support KITL and can debug an OS

Application Developer

Deliver it with your SDK

Test your application before running onreal device

Mapping a Directory to theEmulator

With the Emulator, you can connect to a directory onyour development workstation as if the directory were adrive mounted on the Emulator. In the file system for theEmulator, the directory that the Emulator connects toappears at the root level asStorage Card. You canconnect the Emulator to only one directory at a time.

Mapping a Directory to theEmulator

To map a directory to the Emulator

1.On the Emulator, run a Windows CE OS that supports theability to connect to a directory on the development workstation.

2.In the Emulator window, from the Emulator menu, chooseFolder Sharing.

3.Choose Share Folder.

4.Select a directory to share, and then choose OK.

To remove a mapped directory

1.In the Emulator window, from the Emulator menu, chooseFolder Sharing.