SlideShare a Scribd company logo
1 of 101
The Modern class-based, Object-oriented Windows API
Plus metadata about the classes/members
Plus language projections for natural and familiar use
• C++, C#, JavaScript, others
Use any Windows Runtime class as if it were a standard C++ class
Implement a Windows Runtime class using standard C++
Create XAML applications using standard C++ (Preview)
Uri "http://aka.ms/cppwinrt" // URI to fetch
HttpClient // Class that does the fetching
auto // Make async call & wait
// Display the page
// Uri uri(L"http://aka.ms/cppwinrt");
ComPtr IUriRuntimeClassFactory
THROW_IF_FAILED
ComPtr IUriRuntimeClass
THROW_IF_FAILED
"http://aka.ms/cppwinrt"
For this statement
You must write this code
#include
#include
using namespace
using namespace
int
Uri ref new "http://aka.ms/cppwinrt"
HttpClient ref new HttpClient
auto
79,360 bytes (x86 release)
#include
#include
#include
using namespace
using namespace
int
Uri "http://aka.ms/cppwinrt"
HttpClient
auto
23,522 bytes (x86 release)
70% smaller than CX
•
•
•
http://marketplace.visualstudio.com
m_ptr
winrt::Windows::Foundation::Uri
Without C++/WinRT
Visual Studio
Extension installed
With C++/WinRT
Visual Studio
Extension installed
Build
Add reference to
Microsoft.Graphics.Canvas.winmd
winrtMicrosoft.Graphics.Canvas.*.h
winmd reference
#include
using namespace
// Creates all the thumbnail previews for effect selection UI
void DetailPage
SepiaEffect
L"source"
Build
Class description Skeletal implementations
• Generated FilessourcesPhoto.h
• Generated FilessourcesPhoto.cpp
Complete base class Metadata file
• Photo.g.h Photo.winmd
Copy skeletons to project folder
Include in project
Photo.idl
namespace
delegate void Boolean // delegate type for event
runtimeclass Photo Windows.UI.Xaml.Data.INotifyPropertyChanged // Interface
// Constructors
Windows.Storage.StorageFile
String get // Read-only property
Single // Read-write property
Windows.Foundation.IAsyncAction // (Async) Method
event RecognitionHandler // event
namespace {
struct Photo PhotoT Photo
default
StorageFile const
hstring
float
void float
void
event_token PropertyChangedEventHandler const
void event_token const
Implementation namespace
Base implements WinRT
infrastructure (Photo.g.h)
Photo.h
m_ptr
winrt::PhotoEditor::Photo
winrt::PhotoEditor::implementation::Photo
Build
Photo.winmd
PhotoEditor.Photo
Video.winmd
PhotoEditor.Video
Effects.winmd
PhotoEditor.Effects
PhotoEditor.winmd
PhotoEditor.Photo
PhotoEditor.Video
PhotoEditor.Effects
Namespace metadata
Build
Class description
Skeletal implementations – code behind files
• Generated FilessourcesMainPage.h
• Generated FilessourcesMainPage.cpp
Complete base classes Metadata file
• MainPage.xaml.g.h MainPage.winmd
MainPage.g.h
MainPage.xaml
Copy skeletons to project folder
Include in project
MainPage.idl
XAML markup
"MainPage.g.h"
namespace
struct MainPage MainPageT MainPage
// Property changed notifications
event_token
PropertyChangedEventHandler const
void event_token const
Implementation namespace
Bases implements WinRT
infrastructure
MainPage.xaml.g.h
MainPage.g.h
1. Type: x64
2. Press Enter or select
Where is the C++ compiler?
Where is the C++/WinRT compiler?
#include <stdio.h>
#include <winrt/Windows.Foundation.h>
using namespace winrt;
int main()
{
init_apartment();
Windows::Foundation::Uri uri(L"https://microsoft.com/build");
printf("Welcome to %ls!n", uri.Path().c_str());
}
Brevity please
C++ exception handling
ISO C++17 standard
External references
Add /await for C++ coroutine support
#include <stdio.h>
#include <winrt/Windows.Foundation.h>
using namespace winrt;
int main()
{
init_apartment();
Windows::Foundation::Uri uri(L"https://microsoft.com/build");
printf("Welcome to %ls!n", uri.Path().c_str());
}
Where does
this come from?
1 of 15
Uri uri(L"http://kennykerr.ca/feed");
SyndicationClient client;
auto async = client.RetrieveFeedAsync(uri);
SyndicationFeed feed = async;
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
IAsyncOperationWithProgress<SyndicationFeed, RetrievalProgress>
error C2440: cannot convert from ...
Uri uri(L"http://kennykerr.ca/feed");
SyndicationClient client;
auto async = client.RetrieveFeedAsync(uri);
SyndicationFeed feed = async.get();
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
Blocks while
waiting for result
2 of 15
Uri uri(L"http://kennykerr.ca/feed");
SyndicationClient client;
SyndicationFeed feed = client.RetrieveFeedAsync(uri).get();
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
What about UI
responsiveness?
Uri uri(L"http://kennykerr.ca/feed");
SyndicationClient client;
SyndicationFeed feed = co_await client.RetrieveFeedAsync(uri);
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
Remove trailing .get()
Prepend co_await
IAsyncAction PrintFeedAsync()
{
Uri uri(L"http://kennykerr.ca/feed");
SyndicationClient client;
SyndicationFeed feed = co_await client.RetrieveFeedAsync(uri);
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
}
Don’t forget the
coroutine return type
3 of 15
IAsyncAction PrintFeedAsync(Uri const& uri)
{
SyndicationClient client;
auto feed = co_await client.RetrieveFeedAsync(uri);
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
}
DANGER!
Suspension point
IAsyncAction PrintFeedAsync(Uri uri)
{
SyndicationClient client;
auto feed = co_await client.RetrieveFeedAsync(uri);
for (auto&& item : feed.Items())
{
printf("%lsn", item.Title().Text().c_str());
}
}
Captured by value - great!
void PrintFeed(Uri const& uri)
{
SyndicationClient client;
auto feed = client.RetrieveFeedAsync(uri).get();
// ...
}
IAsyncAction PrintFeedAsync(Uri uri)
{
SyndicationClient client;
auto feed = co_await client.RetrieveFeedAsync(uri);
// ...
}
Function
• Synchronous
• Use const& params
Coroutine
• Asynchronous
• Use value params
4 of 15
hstring ToUpper(hstring const& value);
hstring ToUpper(hstring const& value);
int main()
{
std::wstring std_wstring = L"Oranges";
hstring winrt_hstring = L"Apples";
printf("%lsn", ToUpper(winrt_hstring).c_str());
printf("%lsn", ToUpper(std_wstring).c_str());
printf("%lsn", ToUpper(L"Bananas").c_str());
}
Literals should just work
hstring ToUpper(hstring const& value);
int main()
{
std::wstring std_wstring = L"Oranges";
hstring winrt_hstring = L"Apples";
printf("%lsn", ToUpper(winrt_hstring).c_str());
printf("%lsn", ToUpper(hstring(std_wstring)).c_str());
printf("%lsn", ToUpper(L"Bananas").c_str());
}
Hidden copies…
// Generated code...
hstring ToUpper(param::hstring const& value);
// Your code...
int main()
{
std::wstring std_wstring = L"Oranges";
hstring winrt_hstring = L"Apples";
printf("%lsn", ToUpper(winrt_hstring).c_str());
printf("%lsn", ToUpper(std_wstring).c_str());
printf("%lsn", ToUpper(L"Bananas").c_str());
}
param::* types
optimize input
binding
This just works
and avoids copies
5 of 15
int Sum(IVectorView<int> const& values);
int Sum(IVectorView<int> const& values);
int main()
{
std::vector<int> std_vector{ 2,3,4 };
IVectorView<int> winrt_vector = ...
assert(9 == Sum(winrt_vector));
assert(9 == Sum(std_vector));
assert(9 == Sum({ 2, 3, 4 }));
}
Initializer lists should just work
// Generated code...
int Sum(param::vector_view<int> const& values);
// Your code...
int main()
{
std::vector<int> std_vector{ 2,3,4 };
IVectorView<int> winrt_vector = ...
assert(9 == Sum(winrt_vector));
assert(9 == Sum(std_vector));
assert(9 == Sum({ 2, 3, 4 }));
}
Optimizes
input binding
This just works
and avoids copies
6 of 15
// Generated code...
IAsyncOperation<int> SumAsync(param::async_vector_view<int> const& values);
// Your code...
int main()
{
std::vector<int> std_vector{ 2,3,4 };
IVectorView<int> winrt_vector = ...
assert(9 == SumAsync(winrt_vector).get());
assert(9 == SumAsync(std_vector).get());
assert(9 == SumAsync({ 2, 3, 4 }).get());
}
Constrained
for async input
IAsyncOperation<int> SumAsync(param::async_vector_view<int> const& values);
int main()
{
std::vector<int> std_vector{ 2,3,4 };
IVectorView<int> winrt_vector = ...
assert(9 == SumAsync(winrt_vector).get());
assert(9 == SumAsync(std::move(std_vector)).get());
assert(9 == SumAsync({ 2, 3, 4 }).get());
} Transfer ownership
7 of 15
IAsyncOperation<uint32_t> ComputeAsync()
{
for (uint32_t y = 0; y < height; ++y)
for (uint32_t x = 0; x < width; ++x)
{
// Some compute-bound operation...
}
co_return 123;
} What’s the problem?
IAsyncOperation<uint32_t> ComputeAsync()
{
co_await resume_background();
for (uint32_t y = 0; y < height; ++y)
for (uint32_t x = 0; x < width; ++x)
{
// Some compute-bound operation...
}
co_return 123;
}
Returns control to caller
Immediately resumes
on thread pool
8 of 15
IAsyncAction Async(TextBlock block)
{
co_await resume_background();
// Some compute-bound operation...
block.Text(L"Done!");
}
hresult_wrong_thread
Switch to thread pool
IAsyncAction Async(TextBlock block)
{
apartment_context ui_thread;
co_await resume_background();
// Some compute-bound operation...
co_await ui_thread;
block.Text(L"Done!");
}
Capture calling context
Switch to thread pool
Switch back to calling context
Update UI successfully!
9 of 15
IAsyncAction Async(TextBlock block)
{
apartment_context ui_thread;
co_await resume_background();
// Some compute-bound operation...
co_await ui_thread;
block.Text(L"Done!");
}
Really?
IAsyncAction Async(TextBlock block)
{
co_await resume_background();
// Some compute-bound operation...
co_await resume_foreground(block.Dispatcher());
block.Text(L"Done!");
}
Switch to thread pool
Switch to dispatcher thread
10 of 15
using namespace Windows::Foundation;
int main()
{
IStringable s = ...
printf("%lsn", s.ToString().c_str());
}
Windows::Foundation::IStringable
hstring ToString();
using namespace Windows::Foundation;
struct MyType : implements<MyType, >
{
};
int main()
{
IStringable s = ...
printf("%lsn", s.ToString().c_str());
}
Interfaces to implement
Implementation goes here
using namespace Windows::Foundation;
struct MyType : implements<MyType, IStringable>
{
hstring ToString() { return L"Hello world"; }
};
int main()
{
IStringable s = ...
printf("%lsn", s.ToString().c_str());
}
using namespace Windows::Foundation;
struct MyType : implements<MyType, IStringable>
{
hstring ToString() { return L"Hello world"; }
};
int main()
{
IStringable s = make<MyType>();
printf("%lsn", s.ToString().c_str());
}
Construct implementation
type on heap
Return projected type
using namespace Windows::Foundation;
struct MyType : implements<MyType, IStringable, IClosable>
{
hstring ToString() { return L"Hello world"; }
void Close() { /* Goodbye world */ }
};
int main()
{
IStringable s = make<MyType>();
printf("%lsn", s.ToString().c_str());
IClosable c = s.as<IClosable>();
c.Close();
}
Add interfaces
Add implementation
You’re done,
this works!
11 of 15
using namespace Windows::Foundation::Collections;
template <typename T>
struct MyCollection : implements<MyCollection<T>, IVector<T>, IIterable<T>>
{
T GetAt(uint32_t const index);
uint32_t Size();
IVectorView<T> GetView();
void SetAt(uint32_t const index, T const& value);
void InsertAt(uint32_t const index, T const& value);
void RemoveAt(uint32_t const index);
void Append(T const& value);
void RemoveAtEnd();
void Clear();
uint32_t GetMany(uint32_t startIndex, array_view<T> values);
void ReplaceAll(array_view<T const> value);
IIterator<T> First();
};
Phew…
IVector<int> vector = single_threaded_vector<int>();
vector.Append(1);
vector.Append(2);
vector.Append(3);
for (auto&& value : vector)
{
printf("%d ", value);
}
IVectorView<int> view = vector.GetView();
Create general-purpose
implementation
Use IVector<T> interface
Get IVectorView<T> from IVector<T>
std::vector<int> values{ 1,2,3 };
auto vector = single_threaded_vector<int>(std::move(values));
for (auto&& value : vector)
{
printf("%d ", value);
}
“1 2 3”…
IVector<int> a =
single_threaded_vector<int>();
IMap<hstring, int> b =
single_threaded_map<hstring, int>();
IObservableVector<int> c =
single_threaded_observable_vector<int>();
IObservableMap<hstring, int> d =
single_threaded_observable_map<hstring, int>();
12 of 15
using namespace Windows::Foundation;
EventHandler<int> handler;
handler = [](auto&& /*sender*/, int args)
{
printf("%dn", args);
};
if (handler)
{
IInspectable sender = ...;
handler(sender, 123);
}
Initially empty
Initialize or assign using:
• Lambda
• Free function
• Member function
Check validity
Invoke delegate
13 of 15
IObservableVector<int> v = single_threaded_observable_vector<int>();
v.VectorChanged([](auto&& /*sender*/, auto&& /*args*/)
{
printf("Changedn");
});
v.Append(123);
VectorChanged(VectorChangedEventHandler<T> const&)
Invokes handler(s)
IObservableVector<int> v = ...
event_token token = v.VectorChanged([](auto&&, auto&&)
{
printf("Changedn");
});
v.Append(123);
v.VectorChanged(token);
v.Append(234);
64-bit token
Manually revoke handler
Invoke handler
Handler is not called
IObservableVector<int> v = ...
auto revoker = v.VectorChanged(auto_revoke, [](auto&&, auto&&)
{
printf("Changedn");
});
v.Append(123);
revoker.revoke();
Create auto-revoker
Includes weak reference to event source
Revoke handler if event source still exists
Destructor also calls revoke
14 of 15
struct MyCollection : implements<MyCollection, IObservableVector<int>, ...>
{
event_token VectorChanged(VectorChangedEventHandler<int> const& handler)
{
return m_changed.add(handler);
}
void VectorChanged(event_token const token)
{
m_changed.remove(token);
}
event<VectorChangedEventHandler<int>> m_changed;
};
Just use event<T>
The delegate type
Adds handler to event array
Removes handler from array
15 of 15
event<delegate<std::string, int, float>> changed;
changed.add([](std::string const& a, int b, float c)
{
printf("%s %d %.2fn", a.c_str(), b, c);
});
changed("Hello", 123, .456f);
changed("World", 456, .789f);
delegate<T…>
Non-WinRT types are fine
Doesn’t provide an ABI
Ask on stackoverflow using tag [c++-winrt]
https://aka.ms/cppwinrt/stackoverflow
https://www.visualstudio.com/downloads/
https://go.microsoft.com/fwlink/?linkid=870807
https://marketplace.visualstudio.com
https://aka.ms/PhotoEditorSample
https://aka.ms/cppwinrt
https://aka.ms/cppwinrt/api
Effective C++/WinRT for UWP and Win32
Effective C++/WinRT for UWP and Win32

More Related Content

What's hot

WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debuggingMaarten Smeets
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host headerSergey Belov
 
Android audio system(audio_hardwareinterace)
Android audio system(audio_hardwareinterace)Android audio system(audio_hardwareinterace)
Android audio system(audio_hardwareinterace)fefe7270
 
XML & XPath Injections
XML & XPath InjectionsXML & XPath Injections
XML & XPath InjectionsAMol NAik
 
Android audio system(오디오 출력-트랙생성)
Android audio system(오디오 출력-트랙생성)Android audio system(오디오 출력-트랙생성)
Android audio system(오디오 출력-트랙생성)fefe7270
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolAngelo Corsaro
 
From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfJosé Paumard
 
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek StavisiMasters
 
Hibernate
Hibernate Hibernate
Hibernate Sunil OS
 
Android audio system(audiopolicy_manager)
Android audio system(audiopolicy_manager)Android audio system(audiopolicy_manager)
Android audio system(audiopolicy_manager)fefe7270
 
ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration TestersChris Gates
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementationChethan Pchethan
 
Android audio system(pcm데이터출력준비-서비스서버)
Android audio system(pcm데이터출력준비-서비스서버)Android audio system(pcm데이터출력준비-서비스서버)
Android audio system(pcm데이터출력준비-서비스서버)fefe7270
 
JVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's TricksJVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's TricksDoug Hawkins
 
Bootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and ReactBootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and ReactVMware Tanzu
 

What's hot (20)

WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
 
New PHP Exploitation Techniques
New PHP Exploitation TechniquesNew PHP Exploitation Techniques
New PHP Exploitation Techniques
 
Android audio system(audio_hardwareinterace)
Android audio system(audio_hardwareinterace)Android audio system(audio_hardwareinterace)
Android audio system(audio_hardwareinterace)
 
Java On CRaC
Java On CRaCJava On CRaC
Java On CRaC
 
XML & XPath Injections
XML & XPath InjectionsXML & XPath Injections
XML & XPath Injections
 
Android audio system(오디오 출력-트랙생성)
Android audio system(오디오 출력-트랙생성)Android audio system(오디오 출력-트랙생성)
Android audio system(오디오 출력-트랙생성)
 
JavaScript Event Loop
JavaScript Event LoopJavaScript Event Loop
JavaScript Event Loop
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocol
 
From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdf
 
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
 
Hibernate
Hibernate Hibernate
Hibernate
 
Android audio system(audiopolicy_manager)
Android audio system(audiopolicy_manager)Android audio system(audiopolicy_manager)
Android audio system(audiopolicy_manager)
 
JDBC
JDBCJDBC
JDBC
 
ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration Testers
 
Lombok
LombokLombok
Lombok
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
 
Android audio system(pcm데이터출력준비-서비스서버)
Android audio system(pcm데이터출력준비-서비스서버)Android audio system(pcm데이터출력준비-서비스서버)
Android audio system(pcm데이터출력준비-서비스서버)
 
JVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's TricksJVM Mechanics: Understanding the JIT's Tricks
JVM Mechanics: Understanding the JIT's Tricks
 
Bootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and ReactBootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and React
 

Similar to Effective C++/WinRT for UWP and Win32

Introduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET DriverIntroduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET DriverMongoDB
 
Better Open Source Enterprise C++ Web Services
Better Open Source Enterprise C++ Web ServicesBetter Open Source Enterprise C++ Web Services
Better Open Source Enterprise C++ Web ServicesWSO2
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeMicrosoft Tech Community
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeMicrosoft Tech Community
 
OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++cpjcollege
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
ChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft EdgeChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft EdgePVS-Studio
 
Async programming on NET
Async programming on NETAsync programming on NET
Async programming on NETyuyijq
 
Borland star team to tfs simple migration
Borland star team to tfs simple migrationBorland star team to tfs simple migration
Borland star team to tfs simple migrationShreesha Rao
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#Bertrand Le Roy
 
Unit 1 of c++ first program
Unit 1 of c++ first programUnit 1 of c++ first program
Unit 1 of c++ first programAKR Education
 
Analysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsAnalysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsPVS-Studio
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaFrank Lyaruu
 
C++11 concurrency
C++11 concurrencyC++11 concurrency
C++11 concurrencyxu liwei
 

Similar to Effective C++/WinRT for UWP and Win32 (20)

Introduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET DriverIntroduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET Driver
 
Price of an Error
Price of an ErrorPrice of an Error
Price of an Error
 
Better Open Source Enterprise C++ Web Services
Better Open Source Enterprise C++ Web ServicesBetter Open Source Enterprise C++ Web Services
Better Open Source Enterprise C++ Web Services
 
CGI.ppt
CGI.pptCGI.ppt
CGI.ppt
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
 
OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
Vocabulary Types in C++17
Vocabulary Types in C++17Vocabulary Types in C++17
Vocabulary Types in C++17
 
Day 1
Day 1Day 1
Day 1
 
ChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft EdgeChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft Edge
 
Async programming on NET
Async programming on NETAsync programming on NET
Async programming on NET
 
Borland star team to tfs simple migration
Borland star team to tfs simple migrationBorland star team to tfs simple migration
Borland star team to tfs simple migration
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
Unit 1 of c++ first program
Unit 1 of c++ first programUnit 1 of c++ first program
Unit 1 of c++ first program
 
Analysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsAnalysis of Microsoft Code Contracts
Analysis of Microsoft Code Contracts
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJava
 
C++11 concurrency
C++11 concurrencyC++11 concurrency
C++11 concurrency
 
07-Basic-Input-Output.ppt
07-Basic-Input-Output.ppt07-Basic-Input-Output.ppt
07-Basic-Input-Output.ppt
 
Python, do you even async?
Python, do you even async?Python, do you even async?
Python, do you even async?
 

More from Windows Developer

Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3DOur Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3DWindows Developer
 
Fluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: OfficeFluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: OfficeWindows Developer
 
Building powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apisBuilding powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apisWindows Developer
 
Creating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual LayerCreating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual LayerWindows Developer
 
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017Windows Developer
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Windows Developer
 
How Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independentHow Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independentWindows Developer
 
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows InkHarnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows InkWindows Developer
 
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...Windows Developer
 
Developing for Sets on Windows 10
Developing for Sets on Windows 10Developing for Sets on Windows 10
Developing for Sets on Windows 10Windows Developer
 
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...Windows Developer
 
Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...Windows Developer
 
Fluent Design: Evolving our Design System
Fluent Design: Evolving our Design SystemFluent Design: Evolving our Design System
Fluent Design: Evolving our Design SystemWindows Developer
 
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Windows Developer
 
Windows 10 on ARM for developers
Windows 10 on ARM for developersWindows 10 on ARM for developers
Windows 10 on ARM for developersWindows Developer
 
Building Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in UnityBuilding Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in UnityWindows Developer
 
Set up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOMESet up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOMEWindows Developer
 
Modernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web AppModernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web AppWindows Developer
 
Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...Windows Developer
 
Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction Windows Developer
 

More from Windows Developer (20)

Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3DOur Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
 
Fluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: OfficeFluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: Office
 
Building powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apisBuilding powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apis
 
Creating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual LayerCreating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual Layer
 
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10
 
How Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independentHow Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independent
 
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows InkHarnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink
 
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
 
Developing for Sets on Windows 10
Developing for Sets on Windows 10Developing for Sets on Windows 10
Developing for Sets on Windows 10
 
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
 
Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...
 
Fluent Design: Evolving our Design System
Fluent Design: Evolving our Design SystemFluent Design: Evolving our Design System
Fluent Design: Evolving our Design System
 
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
 
Windows 10 on ARM for developers
Windows 10 on ARM for developersWindows 10 on ARM for developers
Windows 10 on ARM for developers
 
Building Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in UnityBuilding Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in Unity
 
Set up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOMESet up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOME
 
Modernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web AppModernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web App
 
Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...
 
Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Effective C++/WinRT for UWP and Win32