C
C#2y ago
mini

COMException on Windows.Storage.Pickers.FolderPicker

I am receiving the error Error HRESULT E_FAIL has been returned from a call to a COM component when trying to run the following code:
FolderPicker fp = new FolderPicker();
InitializeWithWindow.Initialize(fp, WindowNative.GetWindowHandle(this));
StorageFolder folder = await fp.PickSingleFolderAsync();
FolderPicker fp = new FolderPicker();
InitializeWithWindow.Initialize(fp, WindowNative.GetWindowHandle(this));
StorageFolder folder = await fp.PickSingleFolderAsync();
but why does this happen? FileSavePicker and FileOpenPicker works fine for me.
0 Replies
No replies yetBe the first to reply to this messageJoin