dlls/shell32/cpanelfolder.c - extended
Ge van Geldorp
gvg at reactos.com
Tue Feb 8 18:19:40 CST 2005
This patch includes a patch I sent yesterday
Changelog:
Ge van Geldorp <gvg at reactos.com>
- Fix quoting of .cpl filename
- Use "cplopen" verb to execute .cpl files
Index: dlls/shell32/cpanelfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/cpanelfolder.c,v
retrieving revision 1.12
diff -u -r1.12 cpanelfolder.c
--- dlls/shell32/cpanelfolder.c 14 Jan 2005 16:02:20 -0000 1.12
+++ dlls/shell32/cpanelfolder.c 9 Feb 2005 00:15:02 -0000
@@ -983,17 +983,20 @@
return E_INVALIDARG;
path[0] = '\"';
- l = 1 + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH);
+ /* Return value from MultiByteToWideChar includes terminating NUL, which
+ * compensates for the starting double quote we just put in */
+ l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH);
/* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */
- path[++l] = '"';
- path[++l] = ' ';
+ path[l++] = '"';
+ path[l++] = ' ';
MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, path+l, MAX_PATH);
memcpy(&sei_tmp, psei, sizeof(sei_tmp));
sei_tmp.lpFile = path;
sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST;
+ sei_tmp.lpVerb = L"cplopen";
ret = ShellExecuteExW(&sei_tmp);
if (ret)
More information about the wine-patches
mailing list