This course gives a practical introduction to the Windows Runtime (WinRT), the foundational technology that underpins the future of the Windows API. You'll learn what lies beneath the different language projections, how WinRT relates to COM and .NET, and how to implement COM and Windows Runtime classes with modern C++, Windows Runtime strings, and Windows Runtime components developed in Standard C++.
Implementing the Windows Runtime Welcome back to the essentials of the Windows Runtime. My name is Kenny Kerr, and in this module we're going to look at how to define and implement Windows Runtime interfaces. Before we can begin to construct Runtime clauses, we need to be able to implement the interfaces that those clauses are constructed from. And although you can implement these however you wish, with the addition of a nearly universal new base interface IInspectable it will save a lot of time to get this plumbing out of the way. Implementing the Windows Runtime, at least the clauses that make up the Windows Runtime clauses, involves implementing a lot of interfaces that derive either directly from IUnknown of from IInspectable, which itself derives from IUnknown as all com interfaces must. So we'll begin with IUnknown, and then move on to IInspectable. Although I introduce the Windows Runtime library in my com courses, by today's standards it doesn't really represent modern C++ and as a result is harder to use than it needs to be, so let's see what can be done with modern C++.
Windows Runtime Strings Welcome back to the essentials of the Windows Runtime. My name is Kenny Kerr and in this module I am going to teach you more than you probably want to know about Windows Runtime strings. The thing is that these strings are foundational to the Windows Runtime's activation model. So, you can't get away from them. You could get away with ignoring BSTR or B Strings with classic COM, but you cannot ignore Windows Runtime strings. Strings replace GUID based class identifiers in the Windows Runtime, and form the basis for portably communicating strings across ABI boundaries. It is one of the few handled types you must understand before you can fully understand how the Windows Runtime works. It might not sound all that fun, but if you enjoy modern C++ then you'll enjoy this as well. There's a lot of opportunity here to innovate. Let's take a look.
Windows Runtime Components Welcome back to the Essentials of the Windows Runtime. My name is Kenny Kerr and in this module I'm going to show you how Windows runtime components come to life. In parts 1 and 2 of the Essentials of COM here on Pluralsight, I showed you how to create COM servers. Well Windows runtime components are the moral equivalent and share much in common with COM servers. In particular, the use of IDL, which was optional for COM servers, is practically essential for writing Windows runtime components in C++. There's a lot to cover, so let's get started.