© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y 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
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.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Convert to wave file gives COMException
C#CC# / help
3y ago
How to get Windows.Storage.Provider
C#CC# / help
2y ago
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
C#CC# / help
2y ago
✅ Build on Windows for Windows and Linux simultaneously
C#CC# / help
2y ago