1 / 31

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. Design Goals Character Set Support Kernel Components User-Interface Graphics Connectivity Internet. Windows CE Design Goals. Small Portable Configurable

delphina
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Understanding Win32 Support In Pocket PC And Smartphone Paul Yao President The Paul Yao Company http://www.paulyao.com

  2. Agenda • Design Goals • Character Set Support • Kernel • Components • User-Interface • Graphics • Connectivity • Internet

  3. Windows CE Design Goals • Small • Portable • Configurable • Win32 Compatible • Development Tools • Well-Connected • Real-Time

  4. 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

  5. Windows NT Supports Both Unicode And Ansi APP.EXE USER32.DLL MessageBoxA MessageBoxW MessageBoxW

  6. 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”)

  7. 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 *

  8. 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

  9. 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

  10. 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

  11. COREDLL.DLL • GDI • Text, raster, vector output • Palettes • Printing (except on Palm size PC) • Multimedia • Audio Compression Mgr (AcmDriverID) • Sound (sndPlaySoundW) • Encryption API (CryptEncrypt)

  12. 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)

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. InternetFeatures Supported • Web Server • Active Server Pages Supported • Requires Platform Builder • XML Parser 2.5 • Pocket Internet Explorer • Internet Explorer for Windows CE

  21. 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

  22. Windows CE-SpecificFeatures • Power Management • Notifications • Databases • Desktop Connectivity • RAPI • ActiveSync • Command Bars • Installable User-Mode Drivers

  23. Windows CE-SpecificFunctions and Messages • CreateFileForMapping • GetClipboardDataAlloc • GetKeyboardStatus • GetMessageSource • GetMouseMovePoints • Random • RegisterDevice • SHShowOutOfMemory • TransparentImage • WM_HIBERNATE

  24. CEFUN.EXEA Free Utility • Queries • DLLs and Functions • Both Documented and Undocumented • Limits • No macros • No window classes • No COM interfaces • Available from • info@paulyao.com

  25. 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

  26. 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

  27. 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

  28. Discussion

  29. Thank You!

More Related