Problems unveiled by the last version.c patch

Rein Klazes wijn at wanadoo.nl
Fri Dec 17 06:58:30 CST 2004


On Fri, 17 Dec 2004 12:04:46 +0100 (CET), you wrote:

> Hi Dmitry,
> 
> > <pvriens at xs4all.nl> wrote:
> >
> >> trace:shell:SHELL_GetPathFromIDListA -- F:\temp, 0x00000000
> > ...
> >> trace:shell:SHGetPathFromIDListW -- L"F:\\temp", 0x00000000
> >>
> >> The main difference (apart from the A/W) is that SHGetPathFromIDListW
> >> returns an extra backslash compared to the A-counterpart.
> >
> > If you mean a double backslash in the 2nd line of the above quote
> > then it's just the escaping which debugtsr_w() performs.
> >
> > --
> > Dmitry.
> >
> >
> 
> I think the problem lies in the fact the some of the procedures use
> Unicode depending on the version and some don't care (or use some
> default). Going to the traces I can see:
> 
> Call shell32.SHBrowseForFolder(3de5f760) ret=01003c8d
> ... (always calls SHBrowseForFolderA)
> trace:shell:SHBrowseForFolderA
> Ret  shell32.SHBrowseForFolder() retval=77e30fc0 ret=01003c8d
> ...
> Call shell32.SHGetPathFromIDList(77e30fc0,0100b720) ret=01003c99
> trace:shell:SHGetPathFromIDListAW
> ... (checking the version)
> trace:shell:SHGetPathFromIDListW
> ...
> Ret  shell32.SHGetPathFromIDList() retval=00000001 ret=01003c99
> ...
> Call kernel32.lstrcpyA(0100a360,0100b720 "F") ret=01003ca9
> 
> So you see, we are mixing A and W now:
> - SHBrowseForFolderA
> - SHGetPathFromIDListW
> - lstrcpyA
> 
> In this case does it mean we (I ?) have to implement SHBrowseForFolderAW
> or is that the wrong path (as many calls don't do this and all of them
> have to be checked/corrected)?

SHGetPathFromIDList seems to be the wrong one here (looking at native
shell32.dll from Win2K and Win98), it should be synonymous for
SHGetPathFromIDListA.

Can you try attached patch?

Rein.
-------------- next part --------------
--- wine/dlls/shell32/shell32.spec	2004-11-04 10:17:43.000000000 +0100
+++ mywine/dlls/shell32/shell32.spec	2004-12-17 13:38:29.000000000 +0100
@@ -235,7 +235,7 @@
  288 stdcall ShellAboutA(long str str long)
  289 stdcall ShellAboutW(long wstr wstr long)
  290 stdcall ShellExecuteA(long str str str str long)
- 291 stdcall ShellExecuteEx (long) ShellExecuteExAW
+ 291 stdcall ShellExecuteEx (long) ShellExecuteExA
  292 stdcall ShellExecuteExA (long)
  293 stdcall ShellExecuteExW (long)
  294 stdcall ShellExecuteW (long wstr wstr wstr wstr long)
@@ -343,7 +343,7 @@
 @ stdcall ExtractAssociatedIconExW(long wstr long long)
 @ stub ExtractAssociatedIconW
 @ stdcall ExtractIconA(long str long)
-@ stdcall ExtractIconEx(ptr long ptr ptr long)ExtractIconExAW
+@ stdcall ExtractIconEx(ptr long ptr ptr long)ExtractIconExA
 @ stdcall ExtractIconExA(str long ptr ptr long)
 @ stdcall ExtractIconExW(wstr long ptr ptr long)
 @ stdcall ExtractIconW(long wstr long)
@@ -378,19 +378,19 @@
 @ stub ShellHookProc
 @ stub SHEmptyRecycleBinA
 @ stub SHEmptyRecycleBinW
-@ stdcall SHFileOperation(ptr)SHFileOperationAW
+@ stdcall SHFileOperation(ptr)SHFileOperationA
 @ stdcall SHFileOperationA(ptr)
 @ stdcall SHFileOperationW(ptr)
 @ stub SHFormatDrive
 @ stdcall SHFreeNameMappings(ptr)
 @ stdcall SHGetDesktopFolder(ptr)
-@ stdcall SHGetFileInfo(ptr long ptr long long)SHGetFileInfoAW
+@ stdcall SHGetFileInfo(ptr long ptr long long)SHGetFileInfoA
 @ stdcall SHGetFileInfoA(ptr long ptr long long)
 @ stdcall SHGetFileInfoW(ptr long ptr long long)
 @ stdcall SHGetInstanceExplorer(long)
 @ stdcall SHGetMalloc(ptr)
 @ stub SHGetNewLinkInfo
-@ stdcall SHGetPathFromIDList(ptr ptr)SHGetPathFromIDListAW
+@ stdcall SHGetPathFromIDList(ptr ptr)SHGetPathFromIDListA
 @ stdcall SHGetPathFromIDListA(ptr ptr)
 @ stdcall SHGetPathFromIDListW(ptr ptr)
 @ stdcall SHGetSettings(ptr long)


More information about the wine-devel mailing list