From: Haoyang Chen Subject: [PATCH] shell32: Skip OpenAs_RunDLL in uri Message-Id: Date: Tue, 8 Sep 2020 14:29:23 +0800 In-Reply-To: References: From e2a0874066f14e06d898d72cc22166a2e84dceff Mon Sep 17 00:00:00 2001 From: Haoyang Chen Date: Tue, 8 Sep 2020 14:02:05 +0800 Subject: [PATCH] shell32: Skip OpenAs_RunDLL in uri. OpenAs_RunDLL is not implementsed. The uri without OpenAs_RunDLL will be executed using the default application. Signed-off-by: Haoyang Chen --- dlls/shell32/shlexec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index ce0b8f6d2b..3c0a93e68c 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1587,6 +1587,7 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_UNICODE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR; + static const WCHAR strOpenAs_RunDLLW[] = {'O', 'p', 'e', 'n', 'A', 's', '_', 'R', 'u', 'n', 'D', 'L', 'L', 0}; WCHAR parametersBuffer[1024], dirBuffer[MAX_PATH], wcmdBuffer[1024]; WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd = NULL; @@ -1880,6 +1881,14 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) strcatW(lpstrTmpFile, lpFile); retval = (UINT_PTR)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0); } + /* Check if parameters specifies the use of OpenAs_RunDLLW */ + else if ( strstrW(wszParameters, strOpenAs_RunDLLW) ) + { + /* OpenAs_RunDLLW is not implemented, try to open with the default application */ + retval = (UINT_PTR)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, sei_tmp.lpFile, \ + strstrW(wszParameters, strOpenAs_RunDLLW) + strlenW(strOpenAs_RunDLLW) + 1, NULL, 0); + + } end: TRACE("retval %lu\n", retval); -- 2.20.1