shell32: Accept CSIDL values in SHBrowseForFolderW().
This fixes an access violation when clicking the button to browse for an installation directory in some installers using the BURIKO (BGI/Ethornell) engine. The affected applications call SHBrowseForFolderA(&bi)
with bi.pidlRoot
being 0x11, which causes wine to dereference 0x11 inside InitializeTreeView. On native, this opens the treeview from My Computer.
0x11 is the CSIDL value for My Computer, and passing any pidlRoot from 0 to 2^16 will not crash on native like resource IDs. If an invalid folder value is used then native returns 0 without showing a window. If I delete the My Pictures folder then use CSIDL_MYPICTURES
, the folder gets recreated. None of this works if BIF_NEWDIALOGSTYLE
is used, native crashes with access violation.