ShellExecute IE compatibility problems
Francois Gouget
fgouget at codeweavers.com
Fri Apr 9 05:09:28 CDT 2004
Hi Martin,
Martin Fuchs wrote:
> On 09.04.2004 02:03:37 Francois Gouget wrote:
[...]
> This is what SHELL_FindExecutable() tries to do when enumerating
> the registry keys. What is wrong with that - doesn't this work for you?
Ah, sorry, I missed that code in SHELL_FindExecutable(). It didn't work
but know I know the true reason why: the first thing
SHELL_FindExecutable() does is check for a NULL lpOperation parameter
and return an error.
(and also do a WARN with the parameters in the wrong order)
So the right fix is to remove this check and then it works. So here's
the updated patch:
Changelog:
* dlls/shell32/shlexec.c
Francois Gouget <fgouget at codeweavers.com>
Fix two IE compatibility issues:
- Remove an obsolete check for lpOperation==NULL in
SHELL_FindExecutable().
- The filename may have surrounding quotes. Strip them and proceed
as usual.
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/shell32/shlexec.c
===================================================================
RCS file: /var/cvs/wine/dlls/shell32/shlexec.c,v
retrieving revision 1.40
diff -u -r1.40 shlexec.c
--- a/dlls/shell32/shlexec.c 7 Apr 2004 03:49:51 -0000 1.40
+++ b/dlls/shell32/shlexec.c 9 Apr 2004 10:01:26 -0000
@@ -532,10 +531,10 @@
if (key) *key = '\0';
/* trap NULL parameters on entry */
- if ((lpFile == NULL) || (lpResult == NULL) || (lpOperation == NULL))
+ if ((lpFile == NULL) || (lpResult == NULL))
{
- WARN("(lpFile=%s,lpResult=%s,lpOperation=%s): NULL parameter\n",
- debugstr_w(lpFile), debugstr_w(lpOperation), debugstr_w(lpResult));
+ WARN("(lpFile=%s,lpResult=%s): NULL parameter\n",
+ debugstr_w(lpFile), debugstr_w(lpResult));
return 2; /* File not found. Close enough, I guess. */
}
@@ -948,7 +943,15 @@
/* make copies of all path/command strings */
if (sei_tmp.lpFile)
- strcpyW(wszApplicationName, sei_tmp.lpFile);
+ {
+ int len=lstrlenW(sei_tmp.lpFile);
+ if (sei_tmp.lpFile[0]=='\"' && sei_tmp.lpFile[len-1]=='\"') {
+ lstrcpynW(wszApplicationName,sei_tmp.lpFile+1,sizeof(wszApplicationName)/sizeof(*wszApplicationName));
+ wszApplicationName[len-2]='\0';
+ } else {
+ lstrcpynW(wszApplicationName,sei_tmp.lpFile,sizeof(wszApplicationName)/sizeof(*wszApplicationName));
+ }
+ }
else
*wszApplicationName = '\0';
More information about the wine-patches
mailing list