Developing Applications with eVC 4'0 - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Developing Applications with eVC 4'0

Description:

[F4] - [Next] (Error, Search result, etc.) [F6] - [Next Window] ... Auto. Manual. Precompiled Headers. The Meaning of 'Through header' #include 'stdafx.h' ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 38
Provided by: paul71
Category:

less

Transcript and Presenter's Notes

Title: Developing Applications with eVC 4'0


1
Developing Applicationswith eVC 4.0
  • Paul Yao
  • President
  • The Paul Yao Company
  • http//www.paulyao.com

2
Agenda
  • Highlights of eVC 4.0
  • Tool Tips
  • TroubleShooting

3
Agenda Part 1 / 3
  • Highlights of eVC 4.0
  • What is eVC 4.0?
  • Windows CE .NET Enhancements
  • C Enhancements
  • The Right Tool
  • Tool Tips
  • TroubleShooting

4
What is eVC 4.0?
  • Stand-alone development environment
  • Supports C C
  • Win32 API (.EXEs .DLLs)
  • Also MFC ATL support
  • Native executables
  • Companion to Visual Studio .NET 2003
  • C / VB .NET
  • .NET Compact Framework
  • Managed executables

5
Windows CE .NET 4.1Enhancements
  • Standard SDK
  • Improved emulator
  • Kernel Independent Transport Layer (KITL)
  • .NET Compact Framework
  • CECONFIG.H
  • Shared source code (in Platform Builder)
  • Added 32MB memory for XIP-DLLs
  • Improved power management
  • http//msdn.microsoft.com/msdnmag/issues/02/07/def
    ault.aspx

6
C Enhancements
  • C structured exception handling
  • try
  • catch
  • Throw
  • Runtime Type Information (RTTI)
  • Standard Template Library (STL)

7
The Right Tool
  • eVC 3.0
  • Windows CE 3.0-based smart devices
  • Pocket PC
  • Pocket PC 2002
  • Smartphone 2002
  • eVC 4.0
  • Windows CE .NET-based smart devices
  • Pocket PC 2003

8
Remote ToolseVC 3.0 eVC 4.0
  • Remote SPY
  • Remote Registry Editor
  • Remote Heap Walker
  • Remote File Viewer
  • Remote Zoomin
  • Remote Performance Monitor
  • Remote System Information

9
Remote ToolsNew with eVC 4.0
  • Remote Call Profiler
  • Testing Real-Time Systems in Windows CE .NET by
    Mike Hall and Steve Maillet
  • http//windowsfordevices.deviceforge.com/articles/
    AT2137345992.html
  • Kernel Tracker
  • Graphical display of process, thread, scheduling,
    synchronization
  • Process Viewer

10
Agenda Part 2 / 3
  • Highlights of eVC 4.0
  • Tool Tips
  • IDE Keyboard Shortcuts
  • Preprocessor
  • Compiler
  • Linker
  • TroubleShooting

11
IDE Keyboard Shortcuts
  • F1 - Context Sensitive help
  • F4 - Next (Error, Search result, etc.)
  • F6 - Next Window
  • F9 - Set Breakpoint at cursor
  • Tab - Indent blocks of text
  • Ctrl End Enable auto scroll for output
    windows (build, debug, find)

12
PreprocessorPrecompiled Headers
  • Key Benefit - Faster Build time
  • Obstacles
  • Understanding Setup
  • Automatic versus Manual
  • Establishing Default Settings

13
Precompiled HeadersThree Modes
  • Settings For All Configurations

Off
Auto
Manual
14
Precompiled HeadersThe Meaning of Through
header
Use Precompiled Headers Up to and including
stdafx.h
include "stdafx.h" include "propsip.h" include
ltcommctrl.hgt include ltaygshell.hgt include
ltsipapi.hgt
15
Precompiled HeadersSetup for Manual Mode (1 of 2)
Select Source File
Create headers for one source file
16
Precompiled HeadersSetup for Manual Mode (2 of 2)
Select Source File
Use headers for all other source files
17
Precompiled HeadersDefault Settings
Select Project
Sets default for new items added to project
18
PreprocessorSymbols
  • I486
  • WIN32
  • STRICT
  • USA
  • UNICODE
  • _UNICODE
  • _X86_
  • x86
  • UNDER_CE(CEVersion)
  • _WIN32_WCE(CEVersion)
  • _WIN32_WCE_EMULATION
  • INTLMSG_CODEPAGE
  • INTERNATIONAL

19
PreprocessorSymbols (continued)
  • Windows CE Conditional Compilation
  • ifdef UNDER_CE
  • Targeting a Specific Version
  • if UNDER_CE 300
  • if UNDER_CE gt 211
  • Emulator-Specific Code
  • ifdef _WIN32_WCE_EMULATION

20
PreprocessorSymbols (continued)
  • UNICODE Effects
  • Unicode functions are the default
  • MessageBox macro interpreted as MessageBoxW
  • Unicode data structures are the default
  • LOGFONT macro interpreted as LOGFONTW
  • _UNICODE Effects
  • Modifies tchar.h
  • TCHAR is WCHAR
  • LPTSTR is LPWSTR
  • _tcscpy is wcscpy
  • _T(x) is Lx
  • TEXT(x) is Lx

21
CompilerBuilding DLLs using C
  • An Include File
  • include "MyLen.h"
  • The Source Code (MyLen.cpp)
  • _declspec(dllexport) int _cdecl
  • MyLen(char p)
  • return 4
  • Resulting Exported Function
  • ?MyLen_at__at_YAHPAD_at_Z

22
CompilerBuilding DLLs using C (cont)
  • Solution
  • // MyLen.H
  • ifdef _cplusplus
  • extern "C"
  • endif
  • _declspec(dllexport) int _cdecl MyLen(char p)
  • ifdef _cplusplus
  • endif
  • Resulting Exported Function
  • MyLen

23
CompilerWin32 Message Cracker Macros
  • What They Are
  • Macros to help build window procedures
  • One macro per Win32 message
  • Benefits of Using
  • Make window procedures shorter
  • Correctly crack apart wParam lParam
  • Correctly cast parameter values

24
CompilerWin32 Message Cracker Macros (cont)
  • BEFORE
  • MyWindowProc()
  • switch (msg)
  • case WM_PAINT
  • ltlots of codegt
  • break
  • case WM_MOUSEMOVE
  • ltlots more codegt
  • break
  • default
  • DefWindowProc(hwnd, msg, . . .)

25
CompilerWin32 Message Cracker Macros (cont)
  • AFTER
  • MyWindowProc()
  • switch (msg)
  • HANDLE_MSG(hwnd,WM_PAINT,OnPaint)
  • HANDLE_MSG(hwnd,WM_MOUSEMOVE,OnMove)
  • . . .
  • void OnPaint(HWND hwnd)
  • / WM_PAINT handling code /
  • void OnSize(HWND hwnd,UINT state,int cx,int cy)
  • / WM_SIZE handling code /

26
CompilerWin32 Message Cracker Macros (cont)
  • The definitions
  • include ltwindowsx.hgt
  • A Tool

Email info_at_paulyao.com For a complimentary copy
27
LinkerWhere is that function hiding?
  • Example
  • Where to find "MailOpen", "MailPut", and
    "MailClose"
  • The Answer msgstore.lib
  • How to solve that problem in the general case
  • Cgt dumpbin linkermember2 msgstore.libgtmsgstore.d
    at
  • Cgt dumpbin linkermember2 msmqrt.lib gt msmqrt.dat

28
Agenda Part 3 / 3
  • Highlights of eVC 4.0
  • Tool Tips
  • TroubleShooting
  • Debugging via USB
  • Debugging via network at home
  • Debugging via network at work
  • Emulator set up
  • Adding Win32 DLLs to managed projects

29
Debugging via USB/serial
  • Establish ActiveSync Partnership
  • Use latest version (3.6)
  • Select correct CPU (WCE Configuration Toolbar)
  • For best performance, hide Watch and Variables
    windows
  • Consider using network debugging

30
Debugging via networkAt Home (no DHCP)
  • Establish partnership via USB/serial
  • Static IP address on desktop
  • Static IP Address on smart device
  • Set WINS address to desktop IP address
  • Start-gtSettings-gt ConnectionsNetwork
    AdaptersltSelect AdaptergtName Servers

31
Debugging via networkAt Work (with DHCP)
  • Attach USB/serial cable
  • Enable DHCP on device
  • Attach network card/cable
  • Might need to reset device

32
EmulatorTips for Setting Up
  • Operating System
  • Use Win 2000 sp2, or WinXP
  • Cannot use Win 9x/Me
  • Communications
  • Requires TCP/IP (Internet) Protocol
  • Machine Name must start with letter
  • Tip
  • Login with Administrator privileges
  • Install Microsoft Loopback Adapter

33
Managed Code ProjectsAdding Win32 DLLs
  • In VS .NET Solution Explorer
  • Add-gtAdd Existing Item
  • Set Build Action Content
  • Example
  • Add Helper.dll
  • Downloaded with executable

34
Wrap-Up
  • eVC 4.0
  • For custom devices PocketPC 2003
  • Sophisticated Tool set
  • Many ways to accomplish tasks
  • Email info_at_paulyao.com
  • CRACKERS coding tool
  • CEFUN function viewer tool
  • Training / eCoaching for programmers

35
Your Questions
36
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

37
Thank You!
Write a Comment
User Comments (0)
About PowerShow.com