Title: Introduction to Mobile Application Development with Microsoft Embedded Visual Tools
1Introduction to Mobile Application Development
with Microsoft Embedded Visual Tools
Robert Turner Application Development
Consultant Microsoft UK
2Agenda
- Introduction to Windows CE
- Embedded Visual Tools 3.0
- SDKs
- Embedded Visual C
- Language features and technologies available
- SDK features
- Embedded Visual VB
- Language features and technologies available
- How to use eVB
3Introduction To Windows CE
4What is Windows CE?
- What does it have in common with Windows 2000/XP?
- 32 bit Operating System
- Win32 API etc.
- Subset
- Virtual Memory
- What is different about it?
- Componentized
- Leave out the bits you dont need
- Allows you to cut down memory footprint
- Processor independent
- Supports 11 processor families
- Real time
5What is Windows CE?
- Target Applications
- Embedded systems
- Consumer platforms
- Pocket PC
- Handheld PC
- Smartphone
6Embedded Visual Tools
7What are Embedded Visual Tools ?
- Standalone development tools for Windows CE
- No longer an add in to Visual Studio
- eVB and eVC are separate IDEs
- Separate but can co-exist with VS6, VS.Net and
service packs - No support for Win32 desktop environment
- Benefits
- Greatly simplified setup
- UI tailored to embedded platform
- Lower cost no longer need desktop VC or VB
installed - Disadvantages
- Keeping a common Desktop/Embedded codebase is now
non-trivial
8Demo
9What are the Embedded Visual Tools ?
- Platform Manager
- Manages connection to device
- Select devices
- Setup connection transport and startup server
- ActiveSync transport is simplest
- Test connection
10Tools Landscape Choosing the correct tool
Platform Builder
eVB
eVC
SDE / CF
LOB Apps
UI Apps
Device Drivers
11Programming ModelsEmbedded devices and
applications
Hardware Development
Custom Hardware
OS Development
Custom WinCE OS Configuration
Subset/Superset Win32 APIs
Application Development
Win32 APIs Device Specific
Win32 APIs Device Specific
Win32 APIs Device Specific
PocketPC 2002 SDK
OEM SDK
OEM SDK
12 Software Development Kits
- The SDK allows the application programmer to
target a specific device - Microsoft provides SDKs for P/PC, H/PC,
Smartphone etc. - OEM creates an SDK to support your custom
CE-based device with Platform Builders Export
SDK feature
13SDKs
- Contain
- Header files, libraries and samples
- eVC and eVB extensions (as appropriate)
- Target device configuration
- Emulator
- Wizards
- Online help
- Allow new platforms to be supported
14Embedded Visual C
15eVC
- Language
- C subset of desktop Visual C 6
- Compiled, processor specific
- Optimised code
- C Templates
- Multiple Inheritance
- EXE, DLL, LIB targets
- With and without UI
16eVC
- IDE
- Intellisense parsing per platform (API)
- Enhanced remote debugging - Ethernet
- Remote Tools
- PDB and browse database supported for debugging
and development - Better doc support (SDK dependent)
- Support for new platforms (with SDK)
- Pocket PC 2002
- Smartphone 2002
17eVC 3 Supported Platforms
- HPC Pro (2.0) Palm Sized PC (2.11)
- Birch SP2 (2.12)
- Embedded Device Development
- OEM SDKs from Platform Builder
- Cedar (3.0)
- Pocket PC, HPC 2000, Pocket PC 2002, Smartphone
2002 - A word about eVC 4.0
18Desktop Device
C, H and lib modules
ActiveSync
Platform Manager
Platform Manager (CEMGRC.EXE)
eVC Compiler
CEMON
?.exe ?.dll
?.exe ?.dll
Controls and Com Objects
Coredll.dll
Shared/ 3rd party Libs
CE
19UI stuff whats available
- Windows
- Normal Win32 WM_PAINT messages etc.
- Dialogs
- Standard (button, list, combo etc)
- Progress, Slider, TreeView, Tab, ListView
- DateTime, Calendar
- Custom
20UI stuff (cont)
- Pocket PC
- GameX /GAPI
- Notifications
- Today Add-in
- WC_SIPPREF
- CONTROL "",-1,WC_SIPPREF, NOT
WS_VISIBLE,-10,-10,5,5 - SHInitExtraControls CAPEDIT class
- Graphical Menu Editor
- MFC
- Document View architecture
- Message routing
21What is supported
- Unicode everywhere
- MessageBoxW etc
- COM (inproc only on Pocket PC)
- Early and late binding
- ATL, MFC or Win32
- Win32 structured exception handling
22What is supported(cont)
- Memory Mapped Files
- Window subclassing
- Winsock
- IRDA
- CryptoAPI
- TAPI
- ExTapi, Phone, SMS, WAP, SIM (Smartphone / Pocket
PC Phone) - Printing (not on Pocket PC 2002)
23What is not supported
- C Exceptions
- RTTI
- STL
- RPC
- Security
- Overlapped IO
- Inplace activation
- Edit and Continue
24MFC Pocket PC
- Wizards
- PocketPC App (Dialog, SDI and SDI DocList)
- OCX
- DLL
- New Classes CCe
- CCeCommandBar,CCeDocList, CCeDB, CCeSocket
- Not Supported
- Common Dialogs (Font, PageSetup)
- Common Controls (Animate, CheckListBox,HotKey,
ToolTip, DragListBox) - DAO
- FTP, Gopher, some Html and Http
- MDI, OLE, RichEdit
- Other classes are modified for CE
25MFC Pocket PC
- For
- Fast way to build document based apps
- Good utility class support
- Same as desktop
- CString, CArray, CMap
- Simplifies
- screen control
- Access to sub systems
- Against
- High overhead in memory footprint
- Requires distribution of MFC runtime
26ATL Pocket PC
- Designed for inproc COM classes
- Limited (but powerful) port of the desktop
- Wizards
- ATL Com object
- MFC Support available
- New Object Wizard
- Simple, IE, Registrar, Full and Lite control
- Full and lite Composite control
- Property Page, Dialog
- Limited helper classes
- No implementation of STL to help out
- Free threading only (No apartment)
27ATL Pocket PC
- Not supported
- CBindStatusCallback
- CSnapInItemImpl
- CSnapInPropertyPageImpl
- IObjectSafetyImpl
- IServiceProviderInfo
- Modified
- CWindow heavily modified
- CComModule, CComApartment, CComClassFactorySinglet
on
28eVC runtime diagram
Custom Applications
Standard Applications
Custom DLLs
Custom COM Objects
ATL
MFC
Common Controls
Custom Controls
Input Method1
WinSock
TAPI
Input Method2
CAPI
CE OS
Device Drivers
OEM Hardware
29Pocket PC 2002 SDK
- CPUs
- ARM and Emulation
- Emulation
- High fidelity emulator using NK.BIN image
- Documents
- Pocket PC 2002 centric APIs/Not Generic CE Docs
- Detailed MFC info for Pocket PC 2002 UI
- Much More Sample Code
30Remote Tools
- Remote Spy
- Remote Registry Editor
- Remote Process View
- Remote Heap Walker
- Remote File View
- Remote Zoomin
31DemonstrationMFC App Wizard Application
32Embedded Visual Basic
33About eVB Language
- eVB language is a subset of that used by the
desktop version of Visual Basic - Small, lightweight and interpreted
- Based on VBScript
- eVB combines the robust power of Visual Basic
with the compact portability and ease of use
characteristic of VBScript
34Desktop Device
Form and bas modules
ActiveSync
Platform Manager
Platform Manager (CEMGRC.EXE)
eVB Compiler
?.vb
?.vb
PVBLOAD
PVBHost2
PVBForm2
Controls and Com Objects
vbscript
CE
35Intrinsic controls
- Standard Set
- Picture, Edit, Label, Button
- Line, Group, Check, Radio
- Combo, Listbox, Scroll, Timer
36Intrinsic controls
- Extended Set
- List View, Common Dialog
- Comm, FileSystem
- Grid, Image, Image List
- Menu Bar, Picture Box
- Tab Strip, Tree View, WinSock
37Intrinsic controls
- File and FileSystem
- No native VB access to CE file system
- Hidden controls provide access
- MenuBar
- No visual menu editor
- Hidden control provides access
- ADOCE for all DB access
38Similarities to Desktop
- Functions and Subs
- Bas, and Form modules
- Debug environment
- Immediate window
- Watch Window
- Call stack
- If then else, While wend, Select case, Do
loop, for next, repeat until - Arrays, redim
- API calls via Declare
- On Error Resume Nextgoto 0
39Language omissions
- VB Script derivative
- No Classes
- No Objects
- Late bind COM only
- No Type defs
- On Error
40Environment omissions
- PCode only no EXE or DLL targets
- No compiler
- No runtime editing
- Project Icons
- Form Unload
41Build a sample
- Simple sample (use Treeview sample)
- File Size 3k
- Memory footprint 1.1MB
42eVB How To
- Keep projects small
- lt10k lines per project
- Use ShellExecute to extend
- Great for proof of concept
- Use for screen design
- VB used as Glue
- Build complex code in C
- Use COM or DLL calls to business logic
- Be aware of its limitations
- Dont port Desktop
43Top Design Thoughts
- Pocket PC platform is great to develop for!
- Less CAN be more
- Know your key scenarios and design only for those
- Read is different from edit
- Minimize the difficulty of input
- Single tap, single tap, single tap
- Use Tap and Hold
- Dont make the SIP dance
- Integrate your app with Pocket PC, dont stand out
44Summary
- Embedded Visual Tools provides a very powerful
and flexible toolset for targeting Mobile Devices - No learning curve to use eMbedded Visual Tools
- VB, VC, Win32, MFC, ATL, COM etc
- Microsoft Mobile platforms provide a powerful
programming environment
45(No Transcript)