Janitorial: Get rid of W->A calls for shlexec (2/2)
Marcelo Duarte
wine-devel at bol.com.br
Wed Dec 10 02:07:26 CST 2003
Hi,
Changelog:
Marcelo Duarte <wine-devel at bol.com.br>
-Janitorial: Get rid of W->A calls for shlexec
-Implementation of FindExecutableW
Coments:
After you aplying my patch 1/2 and made corrections using sizeof, I see the
problems in the patch 2/2 and I do the corrections, and now, I think that all
is correct.
Em Ter 09 Dez 2003 05:03, Marcelo Duarte escreveu:
> Hi,
> Please revise for me, mainly the parts:
> -a substituition for strtok for strstrW (I do not found strtokW) in
> SHELL_FindExecutable;
I not sure for correctness.
> -the use of MultiByteToWideChar;
> -the conversion of WCHAR buffer to LPBYTE in function SHELL_TryAppPath,
> line RegQueryValueExW(hkApp, wPath, NULL, NULL, (LPBYTE)buffer, &count);
> -what is the best to use strcpyW/strcatW or lstrcpyW/lstrcatW?
Were I used strlenW and have conversions, I now use strlenW(...)*sizeof(...),
etc.
I use only strcpyW/strcatW.
I do tests using eMule to open a .mp3 and others.... see the trace:
trace:exec:ShellExecuteA
trace:exec:ShellExecuteExA 0x4065bb7c
trace:shell:SHAlloc 80 bytes at 0x403a4c00
trace:exec:ShellExecuteExW32 mask=0x00000000 hwnd=(nil) verb=(null)
file=L"e:\\emule\\incoming\\test.mp3" parm=(null) dir=(null) show=0x00000005
class=not used
trace:exec:ShellExecuteExW32 execute:'L"e:\\emule\\incoming\\test.mp3"','L""'
trace:exec:SHELL_ExecuteW Execute L"e:\\emule\\incoming\\test.mp3" from
directory (null)
trace:exec:SHELL_FindExecutable L"e:\\emule\\incoming\\test.mp3"
trace:exec:SHELL_FindExecutable SearchPathW returned non-zero
trace:exec:SHELL_FindExecutable
xlpFile=L"E:\\eMule\\Incoming\\test.mp3",extension=L".mp3"
trace:exec:SHELL_FindExecutable L".mp3" file
trace:exec:SHELL_FindExecutable File type: L"Winamp.File"
trace:exec:SHELL_FindExecutable returning L"\"C:\\Program
Files\\Winamp\\winamp.exe\" \"E:\\eMule\\Incoming\\test.mp3\""
trace:exec:ShellExecuteExW32 L"e:\\emule\\incoming\\test.mp3"/L"open" =>
L"\"\"C:\\Program Files\\Winamp\\winamp.exe\"
\"E:\\eMule\\Incoming\\test.mp3\"\""/L"Winamp.File\\shell\\open\\command"
trace:exec:SHELL_ExecuteW Execute L"\"C:\\Program Files\\Winamp\\winamp.exe\"
\"E:\\eMule\\Incoming\\test.mp3\"" from directory (null)
trace:shell:SHFree 0x19
trace:shell:SHFree 0x403a4c00
trace:shell:SHFree 0x1
trace:shell:SHFree 0x401fbba1
trace:shell:SHFree 0x1a
--
Marcelo Duarte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell2a.diff
Type: text/x-diff
Size: 43789 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20031210/45590c0e/shell2a.bin
More information about the wine-patches
mailing list