Windows – Why is it said that WinRT replaces the Windows API

apidesktop-bridgewinapiwindowswindows-runtime

In almost every text about the new WinRT API I came to statements like "WinRT is the new API for Windows and replaces the old Win32 API". Since WinRT aims the development Windows Store apps, this statement to me does not seem to hold true.

There are lots of applications I just can not imagine to be done with WinRT (e.g. Microsoft Office, Adobe Products, 3D Designer Programs and even Visual Studio). These applications still need the functionality of the Windows API (aka Win32).

So why is it so often said, that the WinRT API replaces the Windows API?

Best Answer

This has kind of changed, recently due to a couple reasons, but here's the rundown of why you want to use WinRT over Win32 in current Windows application development (circa 2017):

  1. WinRT is leveraged by UWP apps
  2. Win32 apps can be converted into UWP apps using the Desktop Bridge
  3. Windows 10 S requires all apps to go through the Windows Store

enter image description here

Ergo, using WinRT will invoke less time spent converting projects and code for the new Windows 10 S Store-only application paradigm.

In regards to WinRT vs. Win32API vs. .NET, both .NET and WinRT are partially built with Win32; IIRC, they use subsets of it. At least that's what was communicated back in 2012 from ArsTechnica in Peter Bright's article, "Turning to the past to power Windows’ future: An in-depth look at WinRT". That's where this stack chart comes from, or at least it was used there:

enter image description here

Related Topic