Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder picker not working #2973

Closed
dynamiquel opened this issue Jul 22, 2020 · 5 comments
Closed

Folder picker not working #2973

dynamiquel opened this issue Jul 22, 2020 · 5 comments
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-Tooling product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@dynamiquel
Copy link

Describe the bug
When using the PickSingleFolderAsync() method from Windows.Storage.Pickers.FolderPicker. The following exception is given: System.Runtime.InteropServices.COMException: 'Invalid window handle. (0x80070578)'

Steps to reproduce the bug
Use the following code:

var picker = new Windows.Storage.Pickers.FolderPicker();
picker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.Desktop;
picker.FileTypeFilter.Add("*");

var folder = await picker.PickSingleFolderAsync();

Expected behavior
The folder picker opens.

Screenshots
image

Version Info

NuGet package version:
[Microsoft.WinUI 3.0.0-preview2.200713.0]

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041)
November 2019 Update (18363) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jul 22, 2020
@eleanorleffler
Copy link

I had a similar issue #2716.

@StephenLPeters StephenLPeters added area-Tooling appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps team-Markup Issue for the Markup team product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Jul 22, 2020
@jevansaks
Copy link
Member

Duplicate of #2716 (use IInitializeWithWindow to give the owner window).

@manurode
Copy link

manurode commented Feb 25, 2021

@jevansaks I'm using IInitializeWithWindow but I'm getting this:

System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

It's a UWP using Windows.UI.Xaml

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Feb 25, 2021
@krschau krschau removed the needs-triage Issue needs to be triaged by the area owners label Jul 20, 2021
@Osaxely
Copy link

Osaxely commented Jul 8, 2022

Same here. On a UWP (Windows.UI.Xaml) app.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jul 8, 2022
@krschau
Copy link
Contributor

krschau commented Jul 15, 2022

@manurode @Osaxely Are you using a WinUI 2 UWP app? The solution jevansaks gave is specific to WinUI 3, where there is no core window. In WinUI 2 the old solutions should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-Tooling product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

8 participants