BT

Universal Windows Platform Apps Start to Retrace Win32 Functionality

| by Jeff Martin Follow 16 Followers on Mar 27, 2018. Estimated reading time: 2 minutes |

When Microsoft debuted the Universal Windows Platform (UWP) with Windows 10, it promoted the many benefits UWP could offer users: ability to run on any Windows 10 based platform (Desktop, Xbox, HoloLens, IoT, etc.), modern installer/uninstaller, and so on.  A tradeoff of UWP apps is that they originally lacked many traditional features Win32 desktop applications possessed.  Quite simply, in order to give users more security, Microsoft felt the need to restrict what developers could do.

The problem with this approach is that both users and developers are familiar with the power offered by using the traditional Win32 APIs.  Since there is no prohibition against running Win32 applications on Windows 10, sticking with the legacy platform was easier for many developers.  This caused Microsoft a dilemma since it wants to continue to attract users to Windows 10 and encourage developers to write UWP apps.  The forthcoming Windows 10 version 1803 is going to loosen up some the restrictions UWP apps face.

Broader Filesystem Access

UWP Apps may now make use of two different permission options for dealing with the local filesystem.  First, by declaring the AppExecutionAlias extension, an UWP app can have filesystem permissions to the directory it is launched from (when called from a command prompt) and all child directories.

Alternatively, a UWP app may declare the broadFileSystemAccess capability and then be able to access all files a user has access to.  Note that using this capability in an app submitted to the Microsoft Store will require additional information as to how and why it is needed.

Multi-instancing support
This is an opt-in feature for UWP apps that allows for each running instance of an app executing in a separate process.  This provides some degree of safety in that if one instance crashes, it will not affect any of the other instances.

Console Applications

A UWP application will now be able to act and behave like a traditional Win32 console app.  But because it is adhering to the UWP guidelines, it can be published to the Store and launched via an app tile like any UWP app.  Since it is a console application it does support its primary use case: be started from a command prompt or PowerShell window.  

It is important to note that at-present the UWP console apps must use C++ / WinRT or /CX.  .NET based languages are not supported.  A UWP Console app has access to the local device’s filesystem from the directory it is executed from and all subdirectories.  It be given the ability to have broad filesystem access and it may also utilize multi-instance support.  There are some restrictions imposed on UWP console apps, notably they cannot run in the background, may not create windows and must target the desktop or IoT project types. 

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Unless Running on .NET Core by Timothy Liu

-> UWP is hopeless.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT