Your SlideShare is downloading. ×
0
 
Understanding Win32 Support In Pocket PC And Smartphone Paul Yao President The Paul Yao Company http:// www.paulyao.com
Agenda <ul><li>Design Goals </li></ul><ul><li>Character Set Support </li></ul><ul><li>Kernel </li></ul><ul><li>Components ...
Windows CE Design Goals <ul><li>Small </li></ul><ul><li>Portable </li></ul><ul><li>Configurable </li></ul><ul><li>Win32 Co...
General Principles <ul><li>Unicode-Only </li></ul><ul><li>Focus on “Client-side” support </li></ul><ul><li>No Security </l...
Windows NT Supports  Both  Unicode And Ansi APP.EXE MessageBoxA MessageBoxW USER32.DLL MessageBoxW
Unicode Compiler Support <ul><li>ANSI characters and strings </li></ul><ul><ul><li>‘ H’ </li></ul></ul><ul><ul><li>“ Hello...
Unicode Data Types <ul><li>ANSI </li></ul><ul><ul><li>CHAR – resolves to char </li></ul></ul><ul><ul><li>LPSTR – resolves ...
Unicode C-Runtime Functions <ul><li>ANSI </li></ul><ul><ul><li>strlen() – query length </li></ul></ul><ul><ul><li>strcpy()...
Unicode Conversion <ul><li>Functions </li></ul><ul><ul><li>mbstowcs – To Unicode (&quot; W ide-character string&quot;) </l...
COREDLL.DLL <ul><li>Has 1600+ Functions </li></ul><ul><li>KERNEL </li></ul><ul><ul><li>Processes and Threads </li></ul></u...
COREDLL.DLL <ul><li>GDI </li></ul><ul><ul><li>Text, raster, vector output </li></ul></ul><ul><ul><li>Palettes </li></ul></...
COREDLL.DLL <ul><li>C-Runtime Functions </li></ul><ul><li>Remote Access Services (RAS) </li></ul><ul><li>TAPI (lineOpen) <...
Kernel:  Features Supported <ul><li>Processes </li></ul><ul><li>Threads </li></ul><ul><li>Synchronization Objects </li></u...
Kernel:  Features Missing <ul><li>Fibers (*) </li></ul><ul><li>.INI file Access </li></ul><ul><li>C++ Exceptions (*) </li>...
Kernel:  Windows CE-Specific <ul><li>Thread Quantum </li></ul><ul><ul><li>CeSetThreadQuantum </li></ul></ul><ul><li>Thread...
Components <ul><li>Features Supported </li></ul><ul><ul><li>Component Object Model (COM) </li></ul></ul><ul><ul><ul><li>In...
User-Interface <ul><li>Features Supported </li></ul><ul><ul><li>Windows </li></ul></ul><ul><ul><li>Subclassing </li></ul><...
Graphics <ul><li>Features Supported  </li></ul><ul><ul><li>Text </li></ul></ul><ul><ul><ul><li>Truetype fonts </li></ul></...
Connectivity <ul><li>Features Supported </li></ul><ul><ul><li>Windows Sockets API (winsock) </li></ul></ul><ul><ul><li>Int...
Internet Features Supported <ul><li>Web Server </li></ul><ul><ul><li>Active Server Pages Supported </li></ul></ul><ul><ul>...
Internet Web Browsers <ul><li>Pocket Internet Explorer </li></ul><ul><ul><li>HTML 3.2 </li></ul></ul><ul><ul><li>Size (x86...
Windows CE-Specific Features <ul><li>Power Management </li></ul><ul><li>Notifications </li></ul><ul><li>Databases </li></u...
Windows CE-Specific Functions and Messages <ul><li>CreateFileForMapping </li></ul><ul><li>GetClipboardDataAlloc </li></ul>...
CEFUN.EXE A Free Utility <ul><li>Queries </li></ul><ul><ul><li>DLLs and Functions </li></ul></ul><ul><ul><li>Both Document...
Wrap-Up <ul><li>Win32 API on Windows CE </li></ul><ul><ul><li>“ Greatest Hits” of Windows API </li></ul></ul><ul><ul><li>S...
Remember To Fill Out  This Session’s Evaluation!  <ul><li>To access the evals you must be logged into mymsevents.com </li>...
Additional Resources <ul><li>For the latest news and topics on Microsoft Pocket PC and Smartphone development:  www.micros...
Discussion
Thank You!
 
Upcoming SlideShare
Loading in...5
×

CLI313

714

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
714
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Transcript of "CLI313"

    1. 2. Understanding Win32 Support In Pocket PC And Smartphone Paul Yao President The Paul Yao Company http:// www.paulyao.com
    2. 3. Agenda <ul><li>Design Goals </li></ul><ul><li>Character Set Support </li></ul><ul><li>Kernel </li></ul><ul><li>Components </li></ul><ul><li>User-Interface </li></ul><ul><li>Graphics </li></ul><ul><li>Connectivity </li></ul><ul><li>Internet </li></ul>
    3. 4. Windows CE Design Goals <ul><li>Small </li></ul><ul><li>Portable </li></ul><ul><li>Configurable </li></ul><ul><li>Win32 Compatible </li></ul><ul><li>Development Tools </li></ul><ul><li>Well-Connected </li></ul><ul><li>Real-Time </li></ul>
    4. 5. General Principles <ul><li>Unicode-Only </li></ul><ul><li>Focus on “Client-side” support </li></ul><ul><li>No Security </li></ul><ul><li>No “Frills” </li></ul><ul><ul><li>Few helpers (ZeroMemory) </li></ul></ul><ul><ul><li>Cut Win16 functions </li></ul></ul><ul><li>Leave one function when Win32 has 2+ ways to do something </li></ul><ul><ul><li>TextOut versus ExtTextOut </li></ul></ul><ul><ul><li>MoveToEx/LineTo versus Polyline </li></ul></ul>
    5. 6. Windows NT Supports Both Unicode And Ansi APP.EXE MessageBoxA MessageBoxW USER32.DLL MessageBoxW
    6. 7. Unicode Compiler Support <ul><li>ANSI characters and strings </li></ul><ul><ul><li>‘ H’ </li></ul></ul><ul><ul><li>“ Hello Unicode” </li></ul></ul><ul><ul><li>==> Store as ‘char’ or ‘unsigned char’ </li></ul></ul><ul><li>Unicode characters and strings </li></ul><ul><ul><li>L’H’ </li></ul></ul><ul><ul><li>L”Hello Unicode” </li></ul></ul><ul><ul><li>==> Store as ‘short’ or ‘unsigned short’ </li></ul></ul><ul><li>Bi-modal (_UNICODE) </li></ul><ul><ul><li>TEXT(‘H’) </li></ul></ul><ul><ul><li>TEXT(“Hello Unicode”) </li></ul></ul>
    7. 8. Unicode Data Types <ul><li>ANSI </li></ul><ul><ul><li>CHAR – resolves to char </li></ul></ul><ul><ul><li>LPSTR – resolves to char * </li></ul></ul><ul><li>Unicode </li></ul><ul><ul><li>WCHAR – resolves to unsigned short </li></ul></ul><ul><ul><li>LPWSTR – resolves to unsigned short * </li></ul></ul><ul><li>Bi-Modal (_UNICODE) </li></ul><ul><ul><li>TCHAR – resolves to char or unsigned short </li></ul></ul><ul><ul><li>LPTSTR – resolves to char * or unsigned short * </li></ul></ul>
    8. 9. Unicode C-Runtime Functions <ul><li>ANSI </li></ul><ul><ul><li>strlen() – query length </li></ul></ul><ul><ul><li>strcpy() – copy string </li></ul></ul><ul><ul><li>strcat() – concatenate string </li></ul></ul><ul><li>Unicode </li></ul><ul><ul><li>wcslen() – query length </li></ul></ul><ul><ul><li>wcscpy() – copy string </li></ul></ul><ul><ul><li>wcscat() – concatenate string </li></ul></ul><ul><li>Bi-Modal (_UNICODE) </li></ul><ul><ul><li>_tcslen() – query length </li></ul></ul><ul><ul><li>_tcscpy() – copy string </li></ul></ul><ul><ul><li>_tcscat() – concatenate string </li></ul></ul>
    9. 10. Unicode Conversion <ul><li>Functions </li></ul><ul><ul><li>mbstowcs – To Unicode (&quot; W ide-character string&quot;) </li></ul></ul><ul><ul><li>wcstombs – From Unicode </li></ul></ul><ul><li>Establish a clear boundary between Unicode and Non-Unicode Functions </li></ul>The Outside World Windows CE ANSI Unicode ANSI Unicode Clear boundary Unclear boundary ?
    10. 11. COREDLL.DLL <ul><li>Has 1600+ Functions </li></ul><ul><li>KERNEL </li></ul><ul><ul><li>Processes and Threads </li></ul></ul><ul><ul><li>Synchronization objects </li></ul></ul><ul><ul><li>Memory and File mapping </li></ul></ul><ul><ul><li>Object Store – files, registry, databases </li></ul></ul><ul><li>USER </li></ul><ul><ul><li>Windows, menus </li></ul></ul><ul><ul><li>Dialog boxes, property sheets </li></ul></ul><ul><ul><li>Cursors, carets </li></ul></ul>
    11. 12. COREDLL.DLL <ul><li>GDI </li></ul><ul><ul><li>Text, raster, vector output </li></ul></ul><ul><ul><li>Palettes </li></ul></ul><ul><ul><li>Printing (except on Palm size PC) </li></ul></ul><ul><li>Multimedia </li></ul><ul><ul><li>Audio Compression Mgr (AcmDriverID) </li></ul></ul><ul><ul><li>Sound (sndPlaySoundW) </li></ul></ul><ul><li>Encryption API (CryptEncrypt) </li></ul>
    12. 13. COREDLL.DLL <ul><li>C-Runtime Functions </li></ul><ul><li>Remote Access Services (RAS) </li></ul><ul><li>TAPI (lineOpen) </li></ul><ul><li>Localization Support (GetTimeFormat) </li></ul><ul><li>Windows Networking (WNet… APIs) </li></ul><ul><li>CE-Specific APIs </li></ul><ul><ul><li>Databases (CeOpenDatabase) </li></ul></ul><ul><ul><li>Notifications (CeRunAppAtTime) </li></ul></ul>
    13. 14. Kernel: Features Supported <ul><li>Processes </li></ul><ul><li>Threads </li></ul><ul><li>Synchronization Objects </li></ul><ul><li>Memory </li></ul><ul><ul><li>Dynamic Shared sections </li></ul></ul><ul><ul><li>Static shared sections </li></ul></ul><ul><ul><li>Memory mapped files </li></ul></ul><ul><ul><li>Thread local storage </li></ul></ul><ul><li>Win32 Exceptions </li></ul><ul><ul><li>__try </li></ul></ul><ul><ul><li>__except </li></ul></ul><ul><ul><li>__finally </li></ul></ul><ul><ul><li>__leave </li></ul></ul><ul><li>Dynamic Link Libraries </li></ul><ul><li>File I/O </li></ul><ul><li>Long File Names </li></ul><ul><li>Registry </li></ul><ul><li>Clipboard </li></ul>
    14. 15. Kernel: Features Missing <ul><li>Fibers (*) </li></ul><ul><li>.INI file Access </li></ul><ul><li>C++ Exceptions (*) </li></ul><ul><ul><li>try </li></ul></ul><ul><ul><li>throw </li></ul></ul><ul><ul><li>catch </li></ul></ul><ul><li>Win16 Registry Functions </li></ul><ul><li>GlobalAlloc </li></ul><ul><li>Atoms </li></ul><ul><li>Dynamic Data Exchange (DDE) </li></ul><ul><li>Object Linking and Embedding (OLE) </li></ul><ul><li>WaitForMultipleObjects </li></ul><ul><ul><li>bWaitAll must be FALSE </li></ul></ul><ul><li>NT-Style Services </li></ul>(*) Windows CE .NET supports this feature
    15. 16. Kernel: Windows CE-Specific <ul><li>Thread Quantum </li></ul><ul><ul><li>CeSetThreadQuantum </li></ul></ul><ul><li>Thread Priorities </li></ul><ul><ul><li>CeSetThreadPriority </li></ul></ul><ul><ul><li>256 priorities in Windows CE 3.0 </li></ul></ul><ul><li>CE Databases </li></ul><ul><li>Installable Stream Drivers </li></ul><ul><li>ActiveSync </li></ul><ul><li>Power Management </li></ul><ul><li>NKDbgPrintfW </li></ul><ul><ul><li>OutputDebugString </li></ul></ul><ul><ul><li>wsprintf </li></ul></ul>
    16. 17. Components <ul><li>Features Supported </li></ul><ul><ul><li>Component Object Model (COM) </li></ul></ul><ul><ul><ul><li>In-Process Servers </li></ul></ul></ul><ul><ul><ul><li>Local Servers </li></ul></ul></ul><ul><ul><ul><li>Distributed COM (DCOM) </li></ul></ul></ul><ul><ul><li>Automation </li></ul></ul><ul><ul><li>ActiveX Template Library (ATL) </li></ul></ul><ul><li>Features Missing </li></ul><ul><ul><li>COM+ </li></ul></ul><ul><ul><li>MTS </li></ul></ul><ul><ul><li>MSMQ Queued Components (COM object integration) </li></ul></ul>
    17. 18. User-Interface <ul><li>Features Supported </li></ul><ul><ul><li>Windows </li></ul></ul><ul><ul><li>Subclassing </li></ul></ul><ul><ul><li>Dialog Boxes </li></ul></ul><ul><ul><li>Common Dialog Boxes </li></ul></ul><ul><ul><li>Common Controls </li></ul></ul><ul><ul><li>Cursors </li></ul></ul><ul><ul><li>Carets </li></ul></ul><ul><li>Features Missing </li></ul><ul><ul><li>Pure Menus </li></ul></ul><ul><ul><ul><li>Use “command bars” instead </li></ul></ul></ul><ul><ul><li>Some Common Dialogs </li></ul></ul><ul><ul><li>Some Common Controls </li></ul></ul><ul><ul><li>Property Sheet Wizards </li></ul></ul><ul><ul><li>Hooks </li></ul></ul>
    18. 19. Graphics <ul><li>Features Supported </li></ul><ul><ul><li>Text </li></ul></ul><ul><ul><ul><li>Truetype fonts </li></ul></ul></ul><ul><ul><li>Raster </li></ul></ul><ul><ul><ul><li>DIBs </li></ul></ul></ul><ul><ul><li>Vector </li></ul></ul><ul><ul><li>Printing </li></ul></ul><ul><ul><li>DirectDraw </li></ul></ul><ul><ul><li>Game API (GAPI) </li></ul></ul><ul><li>Features Missing </li></ul><ul><ul><li>Coordinate transformation </li></ul></ul><ul><ul><li>Image Color Matching (ICM) </li></ul></ul><ul><ul><li>Metafiles </li></ul></ul><ul><ul><li>OpenGL (3-D library) </li></ul></ul>
    19. 20. Connectivity <ul><li>Features Supported </li></ul><ul><ul><li>Windows Sockets API (winsock) </li></ul></ul><ul><ul><li>Internet Helper API </li></ul></ul><ul><ul><li>WinInet API </li></ul></ul><ul><ul><li>Telephony API (TAPI 2.1) </li></ul></ul><ul><ul><li>Microsoft Message Queue (MSMQ) </li></ul></ul><ul><ul><li>Message API (MAPI) </li></ul></ul><ul><li>Features Missing </li></ul><ul><ul><li>Asynchronous sockets </li></ul></ul>
    20. 21. Internet Features Supported <ul><li>Web Server </li></ul><ul><ul><li>Active Server Pages Supported </li></ul></ul><ul><ul><li>Requires Platform Builder </li></ul></ul><ul><li>XML Parser 2.5 </li></ul><ul><li>Pocket Internet Explorer </li></ul><ul><li>Internet Explorer for Windows CE </li></ul>
    21. 22. Internet Web Browsers <ul><li>Pocket Internet Explorer </li></ul><ul><ul><li>HTML 3.2 </li></ul></ul><ul><ul><li>Size (x86): 1.3MB </li></ul></ul><ul><ul><li>Runs On: PocketPC, Embedded Devices </li></ul></ul><ul><li>Internet Explorer for Windows CE </li></ul><ul><ul><li>HTML 4.0 </li></ul></ul><ul><ul><li>Frames </li></ul></ul><ul><ul><li>Cascading Style Sheet (CSS) </li></ul></ul><ul><ul><li>Dynamic HTML </li></ul></ul><ul><ul><li>ActiveX Controls </li></ul></ul><ul><ul><li>Java Applets </li></ul></ul><ul><ul><li>Size (x86): 3.1MB </li></ul></ul><ul><ul><li>Runs On: Custom Embedded Devices </li></ul></ul><ul><ul><li>Lacks </li></ul></ul><ul><ul><ul><li>Client-side data binding </li></ul></ul></ul><ul><ul><ul><li>VBScript Support </li></ul></ul></ul>
    22. 23. Windows CE-Specific Features <ul><li>Power Management </li></ul><ul><li>Notifications </li></ul><ul><li>Databases </li></ul><ul><li>Desktop Connectivity </li></ul><ul><ul><li>RAPI </li></ul></ul><ul><ul><li>ActiveSync </li></ul></ul><ul><li>Command Bars </li></ul><ul><li>Installable User-Mode Drivers </li></ul>
    23. 24. Windows CE-Specific Functions and Messages <ul><li>CreateFileForMapping </li></ul><ul><li>GetClipboardDataAlloc </li></ul><ul><li>GetKeyboardStatus </li></ul><ul><li>GetMessageSource </li></ul><ul><li>GetMouseMovePoints </li></ul><ul><li>Random </li></ul><ul><li>RegisterDevice </li></ul><ul><li>SHShowOutOfMemory </li></ul><ul><li>TransparentImage </li></ul><ul><li>WM_HIBERNATE </li></ul>
    24. 25. CEFUN.EXE A Free Utility <ul><li>Queries </li></ul><ul><ul><li>DLLs and Functions </li></ul></ul><ul><ul><li>Both Documented and Undocumented </li></ul></ul><ul><li>Limits </li></ul><ul><ul><li>No macros </li></ul></ul><ul><ul><li>No window classes </li></ul></ul><ul><ul><li>No COM interfaces </li></ul></ul><ul><li>Available from </li></ul><ul><ul><li>[email_address] </li></ul></ul>
    25. 26. Wrap-Up <ul><li>Win32 API on Windows CE </li></ul><ul><ul><li>“ Greatest Hits” of Windows API </li></ul></ul><ul><ul><li>Share Source with Existing Windows Applications </li></ul></ul><ul><li>Visit http:// www.paulyao.com </li></ul><ul><ul><li>CEFUN function viewer tool </li></ul></ul><ul><ul><li>Info on Windows CE training classes </li></ul></ul><ul><li>Resources </li></ul><ul><ul><li>http://www.egroups.com/community/windowsce-dev – Great community </li></ul></ul><ul><ul><li>http://www.pocketpc.com – Good Tips </li></ul></ul>
    26. 27. Remember To Fill Out This Session’s Evaluation! <ul><li>To access the evals you must be logged into mymsevents.com </li></ul><ul><ul><li>Go to – http://www.mymsevents.com/MyMSEvents/mobile/Survey/SurveySelect.aspx – mobile </li></ul></ul><ul><ul><li>http://www.mymsevents.com/MyMSEvents/Survey/SurveySelect.aspx – web site </li></ul></ul><ul><li>For more detailed information about filling out evaluations please refer to either the Conference Guide or the CommNet under “Evaluations” </li></ul>You can do this using your PocketPC, Laptop, PC or the CommNet machines in Hall J
    27. 28. Additional Resources <ul><li>For the latest news and topics on Microsoft Pocket PC and Smartphone development: www.microsoft.com/mobile/developer </li></ul><ul><li>For detailed information on the .NET Compact Framework and Visual Studio .NET: mobility.microsoftdev.com </li></ul><ul><li>For detailed information on ASP.NET Mobile controls: www.asp.net/mobile </li></ul><ul><li>For detailed information on Tablet PC development: www.tabletpcdeveloper.com </li></ul><ul><li>To become a Microsoft Mobility Solutions partner: www.microsoft.com/mobile/partner </li></ul><ul><li>To learn how to decrease time to market: www.microsoft.com/mobile/mobile2market </li></ul><ul><li>For technical information and downloads: msdn.microsoft.com </li></ul><ul><li>Post-conference Mobility Developer Conference info www.mymsevents.com </li></ul><ul><li>Market Smartphone and Pocket PC applications to mobile operators with Mobile2Market, visit www.microsoft.com/mobile/mobile2market </li></ul>
    28. 29. Discussion
    29. 30. Thank You!
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×