Skip to content

Bug: Cannot launch folder pickers in LowIL mode (partial trust) #1986

Open
@HEIC-to-JPEG-Dev

Description

@HEIC-to-JPEG-Dev

Description

When running a WinUI 3 app in lowIL mode (as UWP does), you cannot call he folder pickers.

System.UnauthorizedAccessException when trying to use WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);

This is because hwnd is not allowed in LowIL mode.

This prevents UWP migration.

Steps To Reproduce

WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);

Expected Behavior

This line is only required because of the implementation of the MainWindow and is for interrop. But doesn't provide for the high security requirements of LowIL mode.

I expect he pickers to launch

We know this doesn't work for admin mode (privelaged access) either and the WASDK team have created a new API specifically for that. But that new API also doesn't work in low privelage mode.

Version Info

WASDK 1.7
csWinRT 2.2

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions