www.italiancpp.org
C++ in Windows Phone
Apps
Mirco Vanini – Microsoft MVP Windows Embedded
Italian C++ Community
Agenda
The New Old Platform
How & where C++ is supported
When and why to use C++
Introduction to the Windows (Phone) Runtime
Sharing C++ code (demo)
i=2
Italian C++ Community
The New Old Platform
i=3
Italian C++ Community
How: Windows Phone C++ Support
Can be used in any Windows Phone App
Visual Studio Express 2012/3/(5) for Windows Phone
Same C++ compiler & CRT used in Windows 8
Subset of C++ 11 standard features
i=4
Italian C++ Community
Sampling of C++ 11 Standard Features
i=5
RValue references Forward declared enums Bidirectional fences
static_assert Alignment Data-dependency ordering
Auto Standard-layout and trivial types exception_ptr
Trailing return types Extended friend declarations Thread-local storage
Lambdas Local and unnamed types as template arguments __func__
Decltype Range-based for-loop C99 preprocessor
Right angle brackets override and final long long
extern templates Minimal GC support Strongly typed enums
nullptr Atomics
C++11 Features in Visual C++ 11
Announcing the Visual C++ Compiler November 2013
Italian C++ Community
Why use C++
Reusability: You have some legacy code around that you really don't
want to rewrite but still use in your app
Portability: You want to use the code you're about to write on
multiple platforms
Performance: You really are in need for these last bits of
performance benefits and know what you're doing
Personal Preference: You are a developer who really favors C++ over
e.g. C# or you have significantly better skills in C++
i=6
Italian C++ Community
Where you can use C++
All Windows Phone 8 apps can use native code…
◦ XAML apps (8.1)
◦ XAML apps mixed with D3D and WinRT
◦ Pure native D3D apps/games
◦ C++ libraries: Dynamic Link Libraries, Static Libs
◦ WinRT C++ Components
...not all apps need to use native code
i=7
WP 7.0
Silverlight
WP 7.5
Silverlight
WP 8.0
Silverlight
WP 8.1
Silverlight
WP 8.1
WinRT
Italian C++ Community
Why stay on Windows Phone Silverlight?
Existing Code Investment
Existing Install Base
Not yet converged
◦ Camera Lenses
◦ VoIP
◦ Lock Screen Wallpaper.
◦ Clipboard API
◦ Simple Sound Effects (XNA)
◦ Run Under Lock Screen
i=8
Italian C++ Community
Why Retarget to Windows Phone Silverlight 8.1?
Access to SD Cards
Geofencing
App to App SSO (Single Sign-On)
App to App sharing
And much more…
i=9
Italian C++ Community
Windows Phone Runtime
Why learn about WinRT?
◦ WinRT is used in the application model
◦ C++ code called from XAML uses WinRT
◦ Phone Platform APIs are built using WinRT
◦ More Convergence
◦ Latest Tooling
◦ New Controls
◦ Future Investment
◦ Same ECMA-335 standard as .NET
◦ Type-System Projections
◦ CLR Projection
◦ Framework Projection
i=10
Italian C++ Community
A Closer Look at What's Available
i=11
Direct3D with XAML" C++ application actually creates a C# main
project and a separate Windows Runtime Component in C++.
Italian C++ Community
Sharing C++ code
i=12
Italian C++ Community
Recap / Q&A
Welcome back to C++!
i=13
Italian C++ Community
Contact
i=14
Blog http://mircovanini.blogspot.com
Email info@proxsoft.it
Web www.proxsoft.it
Twitter@MircoVanini

C++ in windows phone apps

  • 1.
    www.italiancpp.org C++ in WindowsPhone Apps Mirco Vanini – Microsoft MVP Windows Embedded
  • 2.
    Italian C++ Community Agenda TheNew Old Platform How & where C++ is supported When and why to use C++ Introduction to the Windows (Phone) Runtime Sharing C++ code (demo) i=2
  • 3.
    Italian C++ Community TheNew Old Platform i=3
  • 4.
    Italian C++ Community How:Windows Phone C++ Support Can be used in any Windows Phone App Visual Studio Express 2012/3/(5) for Windows Phone Same C++ compiler & CRT used in Windows 8 Subset of C++ 11 standard features i=4
  • 5.
    Italian C++ Community Samplingof C++ 11 Standard Features i=5 RValue references Forward declared enums Bidirectional fences static_assert Alignment Data-dependency ordering Auto Standard-layout and trivial types exception_ptr Trailing return types Extended friend declarations Thread-local storage Lambdas Local and unnamed types as template arguments __func__ Decltype Range-based for-loop C99 preprocessor Right angle brackets override and final long long extern templates Minimal GC support Strongly typed enums nullptr Atomics C++11 Features in Visual C++ 11 Announcing the Visual C++ Compiler November 2013
  • 6.
    Italian C++ Community Whyuse C++ Reusability: You have some legacy code around that you really don't want to rewrite but still use in your app Portability: You want to use the code you're about to write on multiple platforms Performance: You really are in need for these last bits of performance benefits and know what you're doing Personal Preference: You are a developer who really favors C++ over e.g. C# or you have significantly better skills in C++ i=6
  • 7.
    Italian C++ Community Whereyou can use C++ All Windows Phone 8 apps can use native code… ◦ XAML apps (8.1) ◦ XAML apps mixed with D3D and WinRT ◦ Pure native D3D apps/games ◦ C++ libraries: Dynamic Link Libraries, Static Libs ◦ WinRT C++ Components ...not all apps need to use native code i=7 WP 7.0 Silverlight WP 7.5 Silverlight WP 8.0 Silverlight WP 8.1 Silverlight WP 8.1 WinRT
  • 8.
    Italian C++ Community Whystay on Windows Phone Silverlight? Existing Code Investment Existing Install Base Not yet converged ◦ Camera Lenses ◦ VoIP ◦ Lock Screen Wallpaper. ◦ Clipboard API ◦ Simple Sound Effects (XNA) ◦ Run Under Lock Screen i=8
  • 9.
    Italian C++ Community WhyRetarget to Windows Phone Silverlight 8.1? Access to SD Cards Geofencing App to App SSO (Single Sign-On) App to App sharing And much more… i=9
  • 10.
    Italian C++ Community WindowsPhone Runtime Why learn about WinRT? ◦ WinRT is used in the application model ◦ C++ code called from XAML uses WinRT ◦ Phone Platform APIs are built using WinRT ◦ More Convergence ◦ Latest Tooling ◦ New Controls ◦ Future Investment ◦ Same ECMA-335 standard as .NET ◦ Type-System Projections ◦ CLR Projection ◦ Framework Projection i=10
  • 11.
    Italian C++ Community ACloser Look at What's Available i=11 Direct3D with XAML" C++ application actually creates a C# main project and a separate Windows Runtime Component in C++.
  • 12.
  • 13.
    Italian C++ Community Recap/ Q&A Welcome back to C++! i=13
  • 14.
    Italian C++ Community Contact i=14 Bloghttp://mircovanini.blogspot.com Email info@proxsoft.it Web www.proxsoft.it Twitter@MircoVanini