Hallo Martin.
This patch is giving me trouble:
Author: Martin Fuchs martin-fuchs@gmx.net Date: Sat Feb 11 12:16:56 2006 +0100
shell32: SHELL32_GetItemAttributes()
- correct documentation which incorrectly claimed not to set any
attribute bits
- retrieve file attributes using SHGetPathFromIDListW() when they are
not already present in the internal PIDL structures
- add test case to show the previously wrong folder attributes when
using absolute PIDLs
- fix some memory leaks in the tests
in a couple of wine configurations that I use this leads to an infinite lop when the openfile dialog is called. The call sequence is SHELL32_GetItemAttributes->SHGetPathFromIDListW->ISF_Desktop_fnGetAttributesOf->SHELL32_GetItemAttributes
which repeats until the stack overflows.
Here is a part of a back trace:
| 13 0x7b8533ed SHELL32_GetItemAttributes+0x2dd(psf=0x7bc6bc28, pidl=0x7bc5e058, pdwAttributes=0x7ba5ae54) [/usr/home/projects/wine/mywine/dlls/shell32/shlfolder.c:430] in shell32 (0x7b8533ed) | 14 0x7b83fcb8 ISF_Desktop_fnGetAttributesOf+0x148(iface=0x7bc6bc28, cidl=0x1, apidl=0x7ba5ae5c, rgfInOut=0x7ba5ae54) [/usr/home/projects/wine/mywine/dlls/shell32/shfldr_desktop.c:459] in shell32 (0x7b83fcb8) | 15 0x7b8288cd SHGetPathFromIDListW+0x7d(pidl=0x7bc5e058, pszPath=0x7ba5b0c0) [/usr/home/projects/wine/mywine/dlls/shell32/pidl.c:1273] in shell32 (0x7b8288cd) | 16 0x7b8533ed SHELL32_GetItemAttributes+0x2dd(psf=0x7bc6bbb8, pidl=0x7bc5e058, pdwAttributes=0x7ba5b334) [/usr/home/projects/wine/mywine/dlls/shell32/shlfolder.c:430] in shell32 (0x7b8533ed) | 17 0x7b83fcb8 ISF_Desktop_fnGetAttributesOf+0x148(iface=0x7bc6bbb8, cidl=0x1, apidl=0x7ba5b33c, rgfInOut=0x7ba5b334) [/usr/home/projects/wine/mywine/dlls/shell32/shfldr_desktop.c:459] in shell32 (0x7b83fcb8) | 18 0x7b8288cd SHGetPathFromIDListW+0x7d(pidl=0x7bc5e058, pszPath=0x7ba5b5a0) [/usr/home/projects/wine/mywine/dlls/shell32/pidl.c:1273] in shell32 (0x7b8288cd) | 19 0x7b8533ed SHELL32_GetItemAttributes+0x2dd(psf=0x7bc6dd70, pidl=0x7bc5e058, pdwAttributes=0x7ba5b814) [/usr/home/projects/wine/mywine/dlls/shell32/shlfolder.c:430] in shell32 (0x7b8533ed)
A +relay,+shell log of one loop is attached below.
Running wineprefixcreate or reinstalling wine.inf does not help. On a clean new installation there is no problem (but I like to keep using the old stuff with a hundred or so of installed windows programs).
Any idea?
Rein.
Hello,
This patch is giving me trouble:
does the following patch help to solve your problem?
Regards,
Martin
Index: shlfolder.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v retrieving revision 1.110 diff -u -p -d -r1.110 shlfolder.c --- shlfolder.c 11 Feb 2006 19:39:52 -0000 1.110 +++ shlfolder.c 18 Feb 2006 14:02:08 -0000 @@ -425,11 +425,20 @@ HRESULT SHELL32_GetItemAttributes (IShel
if (!dwAttributes && has_guid) { WCHAR path[MAX_PATH]; + STRRET strret;
/* File attributes are not present in the internal PIDL structure, so get them from the file system. */ - if (SHGetPathFromIDListW(pidl, path)) - dwAttributes = GetFileAttributesW(path); - } + + HRESULT hr = IShellFolder_GetDisplayNameOf(psf, pidl, SHGDN_FORPARSING, &strret); + + if (SUCCEEDED(hr)) { + hr = StrRetToBufW(&strret, pidl, path, MAX_PATH); + + /* call GetFileAttributes() only for file system paths, not for parsing names like "::{...}" */ + if (SUCCEEDED(hr) && path[0]!=':') + dwAttributes = GetFileAttributesW(path); + } + }
/* Set common attributes */ *pdwAttributes |= SFGAO_FILESYSTEM | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANDELETE |
hi,
Like many wine users, I'm having trouble with programs calling the GetFolderAttributes... I've seen your patches and was wondering if it would be possible to download the pre-patched DLLs from somewhere.
I'm running wine 0.9.15 and am surprised that the problem continues since the patch is so old...
Thanks for your help,
Rick Opper
On 13.06.2006 12:22:57 Rick Opper wrote:
hi,
Like many wine users, I'm having trouble with programs calling the GetFolderAttributes... I've seen your patches and was wondering if it would be possible to download the pre-patched DLLs from somewhere.
What problems are there exactly?