BT

InfoQ Homepage News Universal Windows Platform Apps Start to Retrace Win32 Functionality

Universal Windows Platform Apps Start to Retrace Win32 Functionality

Bookmarks

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
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.

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

Community comments

  • Unless Running on .NET Core

    by Timothy Liu /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    -> UWP is hopeless.

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.