I myself ran into this problem.
But I explored it a little further. IExplorerBrowser creates (on my Windows 7 x64 computer) a ExplorerBrowserControl class window. Which itself creates a window of the class DUIViewWndClassName . And the window itself ( DUIViewWndClassName ) is used as a control for the dialog created by IFileOpenDialog . Even window procedures are the same, so there are no subclasses (but I have not checked every subheading of this control).
And file dialogs can be filtered by file type even in library folders. Therefore, I believe that IExplorerBrowser (or the control that it uses) only allows Microsoft not to share knowledge on how to do this. Or, if so, then his somewhat hidden knowledge.
But I got it with IFolderFilterSite (the interface is supported by IExplorerBrowser from CLSID_ExplorerBrowser ). IFolderFilter::ShouldShow is not called for library folders in such cases. I was unable to call ICommDlgBrowser::IncludeObject (even if I did not set IFolderFilter ).
EDIT: I managed to call ICommDlgBrowser::IncludeObject . For some reason, I forgot that I should provide ICommDlgBrowser through IServiceProvider::QueryService , and not through IUnknown::QueryInterface . But still, ICommDlgBrowser::IncludeObject not called for library folders.
source share