[SHELL32] Fix Desktop Properties menu item action (#1833)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Thu, 15 Aug 2019 14:10:06 +0000 (23:10 +0900)
committerGitHub <noreply@github.com>
Thu, 15 Aug 2019 14:10:06 +0000 (23:10 +0900)
1. Right Click the Desktop.
2. Choose "Properties" menu item.
3. "Properties for Display" dialog must be shown.

The parameters of ShellExecuteW were wrong. The execution parameters must be separated from the file parameter.
CORE-16299

dll/win32/shell32/folders/CDesktopFolder.cpp

index 4105932..277499f 100644 (file)
@@ -845,8 +845,11 @@ HRESULT WINAPI CDesktopFolder::CallBack(IShellFolder *psf, HWND hwndOwner, IData
     {
         if (uMsg == DFM_INVOKECOMMAND && wParam == 0)
         {
-            if (32 >= (UINT_PTR)ShellExecuteW(hwndOwner, L"open", L"rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL))
+            if (32 >= (UINT_PTR)ShellExecuteW(hwndOwner, L"open", L"rundll32.exe",
+                                              L"shell32.dll,Control_RunDLL desk.cpl", NULL, SW_SHOWNORMAL))
+            {
                 return E_FAIL;
+            }
             return S_OK;
         }
         else if (uMsg == DFM_MERGECONTEXTMENU)