From 39ce22150a0bd516a3f61d9061a7f0ca332e7cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Jab=C5=82o=C5=84ski?= Date: Sun, 4 May 2025 17:47:28 +0200 Subject: [PATCH] [DESK][SHELL32] Remove desk.cpl hacks for argument parsing (#7934) Remove argument parsing hacks from desk.cpl that were originally introduced to make it work with the previous broken implementation of `Control_RunDLLW`. CORE-20076 - Remove argument parsing hacks from desk.cpl; - Fix some issues with space separated string parsing in `Control_RunDLL`; - Windows seems to allow invalid dialog-box names if there is only one dialog-box. --- dll/cpl/desk/desk.c | 9 --------- dll/win32/shell32/wine/control.c | 12 ++++++++---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dll/cpl/desk/desk.c b/dll/cpl/desk/desk.c index 0dc2bad30b9..f310b843d3b 100644 --- a/dll/cpl/desk/desk.c +++ b/dll/cpl/desk/desk.c @@ -174,23 +174,14 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam) nPage = _wtoi((PWSTR)lParam); -#if 0 argv = CommandLineToArgvW((LPCWSTR)lParam, &argc); -#else - argv = CommandLineToArgvW(GetCommandLineW(), &argc); -#endif if (argv && argc) { for (i = 0; i= applet->count && (wszDialogBoxName[0] == L'\0' || wszDialogBoxName[0] == L'@')) + if (applet->count == 1 || + (sp >= applet->count && (wszDialogBoxName[0] == UNICODE_NULL || wszDialogBoxName[0] == L'@'))) { sp = 0; }