Understanding win32 support in pocket pc and smartphone
This presentation is the property of its rightful owner.
Sponsored Links
1 / 31

Understanding Win32 Support In Pocket PC And Smartphone PowerPoint PPT Presentation


  • 102 Views
  • Uploaded on
  • Presentation posted in: General

Understanding Win32 Support In Pocket PC And Smartphone. Paul Yao President The Paul Yao Company http://www.paulyao.com. Agenda. Design Goals Character Set Support Kernel Components User-Interface Graphics Connectivity Internet. Windows CE Design Goals. Small Portable Configurable

Download Presentation

Understanding Win32 Support In Pocket PC And Smartphone

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Understanding win32 support in pocket pc and smartphone

Understanding Win32 Support In Pocket PC And Smartphone

Paul Yao

President

The Paul Yao Company

http://www.paulyao.com


Agenda

Agenda

  • Design Goals

  • Character Set Support

  • Kernel

  • Components

  • User-Interface

  • Graphics

  • Connectivity

  • Internet


Windows ce design goals

Windows CE Design Goals

  • Small

  • Portable

  • Configurable

  • Win32 Compatible

  • Development Tools

  • Well-Connected

  • Real-Time


General principles

General Principles

  • Unicode-Only

  • Focus on “Client-side” support

  • No Security

  • No “Frills”

    • Few helpers (ZeroMemory)

    • Cut Win16 functions

  • Leave one function when Win32 has 2+ ways to do something

    • TextOut versus ExtTextOut

    • MoveToEx/LineTo versus Polyline


Windows nt supports both unicode and ansi

Windows NT Supports Both Unicode And Ansi

APP.EXE

USER32.DLL

MessageBoxA

MessageBoxW

MessageBoxW


Unicode compiler support

UnicodeCompiler Support

  • ANSI characters and strings

    • ‘H’

    • “Hello Unicode”

    • ==> Store as ‘char’ or ‘unsigned char’

  • Unicode characters and strings

    • L’H’

    • L”Hello Unicode”

    • ==> Store as ‘short’ or ‘unsigned short’

  • Bi-modal (_UNICODE)

    • TEXT(‘H’)

    • TEXT(“Hello Unicode”)


Unicode data types

UnicodeData Types

  • ANSI

    • CHAR – resolves to char

    • LPSTR – resolves to char *

  • Unicode

    • WCHAR – resolves to unsigned short

    • LPWSTR – resolves to unsigned short *

  • Bi-Modal (_UNICODE)

    • TCHAR – resolves to char or unsigned short

    • LPTSTR – resolves to char * or unsigned short *


Unicode c runtime functions

UnicodeC-Runtime Functions

  • ANSI

    • strlen() – query length

    • strcpy() – copy string

    • strcat() – concatenate string

  • Unicode

    • wcslen() – query length

    • wcscpy() – copy string

    • wcscat() – concatenate string

  • Bi-Modal (_UNICODE)

    • _tcslen() – query length

    • _tcscpy() – copy string

    • _tcscat() – concatenate string


Unicode conversion

Functions

mbstowcs – To Unicode ("Wide-character string")

wcstombs – From Unicode

Establish a clear boundary between Unicode and Non-Unicode Functions

?

Unicode Conversion

The Outside World

ANSI

Unicode

ANSI

Unclear

boundary

Clear

boundary

Unicode

Windows CE


Coredll dll

COREDLL.DLL

  • Has 1600+ Functions

  • KERNEL

    • Processes and Threads

    • Synchronization objects

    • Memory and File mapping

    • Object Store – files, registry, databases

  • USER

    • Windows, menus

    • Dialog boxes, property sheets

    • Cursors, carets


Coredll dll1

COREDLL.DLL

  • GDI

    • Text, raster, vector output

    • Palettes

    • Printing (except on Palm size PC)

  • Multimedia

    • Audio Compression Mgr (AcmDriverID)

    • Sound (sndPlaySoundW)

  • Encryption API (CryptEncrypt)


Coredll dll2

COREDLL.DLL

  • C-Runtime Functions

  • Remote Access Services (RAS)

  • TAPI (lineOpen)

  • Localization Support (GetTimeFormat)

  • Windows Networking (WNet… APIs)

  • CE-Specific APIs

    • Databases (CeOpenDatabase)

    • Notifications (CeRunAppAtTime)


Kernel features supported

Processes

Threads

Synchronization Objects

Memory

Dynamic Shared sections

Static shared sections

Memory mapped files

Thread local storage

Win32 Exceptions

__try

__except

__finally

__leave

Dynamic Link Libraries

File I/O

Long File Names

Registry

Clipboard

Kernel: Features Supported


Kernel features missing

Fibers (*)

.INI file Access

C++ Exceptions (*)

try

throw

catch

Win16 Registry Functions

GlobalAlloc

Atoms

Dynamic Data Exchange (DDE)

Object Linking and Embedding (OLE)

WaitForMultipleObjects

bWaitAll must be FALSE

NT-Style Services

Kernel: Features Missing

(*) Windows CE .NET supports this feature


Kernel windows ce specific

Thread Quantum

CeSetThreadQuantum

Thread Priorities

CeSetThreadPriority

256 priorities in Windows CE 3.0

CE Databases

Installable Stream Drivers

ActiveSync

Power Management

NKDbgPrintfW

OutputDebugString

wsprintf

Kernel: Windows CE-Specific


Components

Features Supported

Component Object Model (COM)

In-Process Servers

Local Servers

Distributed COM (DCOM)

Automation

ActiveX Template Library (ATL)

Features Missing

COM+

MTS

MSMQ Queued Components (COM object integration)

Components


User interface

Features Supported

Windows

Subclassing

Dialog Boxes

Common Dialog Boxes

Common Controls

Cursors

Carets

Features Missing

Pure Menus

Use “command bars” instead

Some Common Dialogs

Some Common Controls

Property Sheet Wizards

Hooks

User-Interface


Graphics

Features Supported

Text

Truetype fonts

Raster

DIBs

Vector

Printing

DirectDraw

Game API (GAPI)

Features Missing

Coordinate transformation

Image Color Matching (ICM)

Metafiles

OpenGL (3-D library)

Graphics


Connectivity

Features Supported

Windows Sockets API (winsock)

Internet Helper API

WinInet API

Telephony API (TAPI 2.1)

Microsoft Message Queue (MSMQ)

Message API (MAPI)

Features Missing

Asynchronous sockets

Connectivity


Internet features supported

InternetFeatures Supported

  • Web Server

    • Active Server Pages Supported

    • Requires Platform Builder

  • XML Parser 2.5

  • Pocket Internet Explorer

  • Internet Explorer for Windows CE


Internet web browsers

Pocket Internet Explorer

HTML 3.2

Size (x86): 1.3MB

Runs On: PocketPC, Embedded Devices

Internet Explorer for Windows CE

HTML 4.0

Frames

Cascading Style Sheet (CSS)

Dynamic HTML

ActiveX Controls

Java Applets

Size (x86): 3.1MB

Runs On: Custom Embedded Devices

Lacks

Client-side data binding

VBScript Support

InternetWeb Browsers


Windows ce specific features

Windows CE-SpecificFeatures

  • Power Management

  • Notifications

  • Databases

  • Desktop Connectivity

    • RAPI

    • ActiveSync

  • Command Bars

  • Installable User-Mode Drivers


Windows ce specific functions and messages

Windows CE-SpecificFunctions and Messages

  • CreateFileForMapping

  • GetClipboardDataAlloc

  • GetKeyboardStatus

  • GetMessageSource

  • GetMouseMovePoints

  • Random

  • RegisterDevice

  • SHShowOutOfMemory

  • TransparentImage

  • WM_HIBERNATE


Cefun exe a free utility

CEFUN.EXEA Free Utility

  • Queries

    • DLLs and Functions

    • Both Documented and Undocumented

  • Limits

    • No macros

    • No window classes

    • No COM interfaces

  • Available from

    • [email protected]


Wrap up

Wrap-Up

  • Win32 API on Windows CE

    • “Greatest Hits” of Windows API

    • Share Source with Existing Windows Applications

  • Visit http://www.paulyao.com

    • CEFUN function viewer tool

    • Info on Windows CE training classes

  • Resources

    • http://www.egroups.com/community/windowsce-dev – Great community

    • http://www.pocketpc.com – Good Tips


Remember to fill out this session s evaluation

Remember To Fill Out This Session’s Evaluation!

  • To access the evals you must be logged into mymsevents.com

    • Go to – http://www.mymsevents.com/MyMSEvents/mobile/Survey/SurveySelect.aspx– mobile

    • http://www.mymsevents.com/MyMSEvents/Survey/SurveySelect.aspx– web site

  • For more detailed information about filling out evaluations please refer to either the Conference Guide or the CommNet under “Evaluations”

You can do this using your PocketPC, Laptop, PC or the CommNet machines in Hall J


Additional resources

Additional Resources

  • For the latest news and topics on Microsoft Pocket PC and Smartphone development: www.microsoft.com/mobile/developer

  • For detailed information on the .NET Compact Framework and Visual Studio .NET: mobility.microsoftdev.com

  • For detailed information on ASP.NET Mobile controls: www.asp.net/mobile

  • For detailed information on Tablet PC development: www.tabletpcdeveloper.com

  • To become a Microsoft Mobility Solutions partner: www.microsoft.com/mobile/partner

  • To learn how to decrease time to market: www.microsoft.com/mobile/mobile2market

  • For technical information and downloads: msdn.microsoft.com

  • Post-conference Mobility Developer Conference infowww.mymsevents.com

  • Market Smartphone and Pocket PC applications to mobile operators with Mobile2Market, visit www.microsoft.com/mobile/mobile2market


Discussion

Discussion


Thank you

Thank You!


  • Login