[RESEND] commdlg: use IShellFolder::GetDisplayNameOf instead of SHGetPathFromIDList

Michael Jung mjung at iss.tu-darmstadt.de
Tue May 24 09:17:35 CDT 2005


Ok, next try ;)

Mike McCormack wrote:
> Perhaps you can use IShellFolder_GetDisplayNameOf() rather than 
> ILGetDisplayName?

Back to IShellFolder::GetDisplayNameOf, but without the delay import on ole32.

Another excerpt from MSDN:
"Prior to Windows 2000, browsing a shell namespace extension in the common 
dialogs does not work correctly if the calling application has specified the 
OFN_ALLOWMULTISELECT flag for the common dialog. This is because when 
OFN_ALLOWMULTISELECT is specified, the common dialog will call 
SHGetPathFromIDList and not IShellFolder::GetDisplayNameOf to obtain the name 
of the objects. This has been corrected in Windows 2000."

-- Original message:

SHGetPathFromIDList works only for IDLists that use shell32's native binary
format. Therefore it doesn't work with shell namespace extensions. The MSDN
article "How To Support Common Dialog Browsing in a Shell Namespace
Extension" states that "The extension must be able to supply a valid file
system path in response to its IShellFolder::GetDisplayNameOf when
SHGDN_FORPARSING is specified". Therefore calling GetDisplayNameOf should
give the same result as SHGetPathFromIDList for the standard shell folders
(MyComputer, MyDocuments, ...), while in addition being compatible with
namespace extensions. As far as I understand it, the article mentioned above
also states that Microsoft completely switched from SHGetPathFromIDList to
GetDisplayNameOf in win2k's comdlg32 and the office 2k file dialogs.

Changelog:
	Use IShellFolder::GetDisplayNameOf instead of SHGetPathFromIDList to be able
to browse shell namespace extensions.

Bye,
--
Michael Jung
mjung at iss.tu-darmstadt.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlls_commdlg_filedlg_c.diff
Type: text/x-diff
Size: 5776 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050524/2ab8b217/dlls_commdlg_filedlg_c.bin


More information about the wine-patches mailing list