Author: gadamopoulos
Date: Sun Sep 27 11:31:52 2015
New Revision: 69370
URL:
http://svn.reactos.org/svn/reactos?rev=69370&view=rev
Log:
[SHELL32]
- Improve a change from r27016. Running the control panel applets in the context of
explorer is not correct. We should really use ShellExecute here.
Modified:
trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1]
(original)
+++ trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1] Sun Sep
27 11:31:52 2015
@@ -717,13 +717,15 @@
if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_OPEN)) //FIXME
{
+ /* Hardcode the command here; Executing a cpl file would be fine but we also need
to run things like console.dll */
WCHAR wszParams[MAX_PATH];
-
- wcscpy(wszParams, pCPanel->szName);
- wcscat(wszParams, L",");
- wcscat(wszParams, pCPanel->szName + pCPanel->offsDispName);
-
- Control_RunDLLW (NULL, NULL, wszParams, SW_NORMAL);
+ PWSTR wszFile = L"rundll32.exe";
+ PWSTR wszFormat = L"shell32.dll,Control_RunDLL %s,%s";
+
+ wsprintfW(wszParams, wszFormat, pCPanel->szName, pCPanel->szName +
pCPanel->offsDispName);
+
+ /* Note: we pass the applet name to Control_RunDLL to distinguish between
multiple applets in one .cpl file */
+ ShellExecuteW(NULL, NULL, wszFile, wszParams, NULL, 0);
}
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_CREATELINK)) //FIXME
{