Remember Windows 8? Microsoft is still trying to reunify the API it split for the touchy OS's benefit

Old meets new in WinRT API Packs


Microsoft has released "WinRT API Packs" for Windows desktop developers, letting you call on platform functions previously restricted to UWP apps, as well as a preview Windows Forms designer for .NET Core 3.0 desktop applications.

There is a lot to parse here. The world may be trying to forget Windows 8, but it marked a change in direction for Windows desktop development that is still significant today. Windows 8, released in 2012, introduced the Windows Runtime, or WinRT, which aimed to provide a secure, touch-friendly, app store-oriented application platform alongside the familiar Win32/Win64 platform.

Microsoft soon started back-pedalling as the new platform failed to win adoption. Windows 10 in 2015 restored the desktop as the primary user interface, but in the meantime the developer division had obediently made many modern API functions WinRT-specific. Microsoft transitioned WinRT to UWP (Universal Windows Platform), retaining some of the WinRT concepts, but with the idea of running on Windows desktop, phone, Xbox and HoloLens.

Much of the rationale behind UWP disappeared when Windows Phone died, leaving Xamarin (Windows, iOS, Android and Mac) the closest thing Microsoft has to a universal developer framework. Microsoft still offers UWP as an option, but in the majority of cases there is little advantage, and some disadvantage, when building a desktop application for Windows.

That leaves the question of what to do about those WinRT APIs. The new WinRT API pack, now generally available, is a package you can add to desktop applications that makes those APIs available, covering areas such as geolocation, AI (including speech recognition), maps, sensors and more. While the ability to call WinRT APIs from desktop apps is not new, it is now easier since the package handles all the necessary contract files and assembly references.

There are still complications. One is that some UWP APIs require what Microsoft calls "packaged apps". This means you have to wrap the application in an MSIX installer package for them to work. Packaging gives the app a system identity used for permissions and more. Details of which APIs work are here. The Windows API therefore remains untidy as developers continue to pick up the pieces of the failure of Windows 8 and Windows Phone.

Another issue is that UWP APIs, naturally, do not work on Windows 7. While this used to be a deal breaker, it is not so much today, with Windows 7 going out of support in January 2020. Another big deal for Microsoft platform developers is the transition from the Windows-only .NET Framework to the cross-platform and open source .NET Core. Version 3.0, just released, adds support for desktop applications using WPF (Windows Presentation Framework) and Windows Forms. Full Visual Studio support is lagging, though, and a visual designer for Windows Forms with .NET Core has only just hit preview.

This Windows Forms designer has been completely rewritten. The complication is that Visual Studio itself uses .NET Framework, not Core. Microsoft has written a new bridging process, WinFormsSurface.exe, which communicates between the designer and the main part of Visual Studio.

The consequence of this trickery, and the differences between the two varieties of .NET, is that this remains "an early preview with many features still to be implemented", according to the release notes.

You can use this with the WinRT API pack and it was easy to run up a quick sample calling the geolocation API.

Why is Microsoft bothering with Windows Forms? The reason is that the company has yet to improve on it for quick and easy desktop development, even though WPF is far superior for scaling, visual transitions and more.

Does desktop development still matter? Looking around here at Microsoft's Future Decoded event in London, you would think not. AI and cloud dominate, and for cross-platform on mobile devices you still need Xamarin, or an alternative framework such as Google's Flutter.

However, the reality in business is that many of us still spend much of our time bashing PC keyboards and for as long as that remains true, you can expect Windows desktop development to remain important. ®


Other stories you might like

  • VMware claims ‘bare-metal’ performance from virtualized Nvidia GPUs
    Is... is that why Broadcom wants to buy it?

    The future of high-performance computing will be virtualized, VMware's Uday Kurkure has told The Register.

    Kurkure, the lead engineer for VMware's performance engineering team, has spent the past five years working on ways to virtualize machine-learning workloads running on accelerators. Earlier this month his team reported "near or better than bare-metal performance" for Bidirectional Encoder Representations from Transformers (BERT) and Mask R-CNN — two popular machine-learning workloads — running on virtualized GPUs (vGPU) connected using Nvidia's NVLink interconnect.

    NVLink enables compute and memory resources to be shared across up to four GPUs over a high-bandwidth mesh fabric operating at 6.25GB/s per lane compared to PCIe 4.0's 2.5GB/s. The interconnect enabled Kurkure's team to pool 160GB of GPU memory from the Dell PowerEdge system's four 40GB Nvidia A100 SXM GPUs.

    Continue reading
  • Nvidia promises annual datacenter product updates across CPU, GPU, and DPU
    Arm one year, x86 the next, and always faster than a certain chip shop that still can't ship even one standalone GPU

    Computex Nvidia's push deeper into enterprise computing will see its practice of introducing a new GPU architecture every two years brought to its CPUs and data processing units (DPUs, aka SmartNICs).

    Speaking on the company's pre-recorded keynote released to coincide with the Computex exhibition in Taiwan this week, senior vice president for hardware engineering Brian Kelleher spoke of the company's "reputation for unmatched execution on silicon." That's language that needs to be considered in the context of Intel, an Nvidia rival, again delaying a planned entry to the discrete GPU market.

    "We will extend our execution excellence and give each of our chip architectures a two-year rhythm," Kelleher added.

    Continue reading
  • Now Amazon puts 'creepy' AI cameras in UK delivery vans
    Big Bezos is watching you

    Amazon is reportedly installing AI-powered cameras in delivery vans to keep tabs on its drivers in the UK.

    The technology was first deployed, with numerous errors that reportedly denied drivers' bonuses after malfunctions, in the US. Last year, the internet giant produced a corporate video detailing how the cameras monitor drivers' driving behavior for safety reasons. The same system is now apparently being rolled out to vehicles in the UK. 

    Multiple camera lenses are placed under the front mirror. One is directed at the person behind the wheel, one is facing the road, and two are located on either side to provide a wider view. The cameras are monitored by software built by Netradyne, a computer-vision startup focused on driver safety. This code uses machine-learning algorithms to figure out what's going on in and around the vehicle.

    Continue reading

Biting the hand that feeds IT © 1998–2022