Commit d321561b authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Restore default "open" functionality of ShellExecute.

parent 410db2ad
......@@ -719,6 +719,8 @@ static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hData,
ULONG_PTR dwData1, ULONG_PTR dwData2)
{
TRACE("dde_cb: %04x, %04x, %p, %p, %p, %p, %p, %p\n",
uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2);
return NULL;
}
......@@ -1108,7 +1110,6 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfun
}
}
/* expand environment strings */
if (ExpandEnvironmentStringsW(sei_tmp.lpFile, buffer, MAX_PATH))
lstrcpyW(wszApplicationName, buffer);
......@@ -1122,7 +1123,7 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfun
lstrcpyW(wszDir, buffer);
/* Else, try to execute the filename */
TRACE("execute:'%s','%s','%s'\n", debugstr_w(wszApplicationName), debugstr_w(wszParameters), debugstr_w(wszDir));
TRACE("execute:%s,%s,%s\n", debugstr_w(wszApplicationName), debugstr_w(wszParameters), debugstr_w(wszDir));
/* separate out command line arguments from executable file name */
if (!*sei_tmp.lpParameters) {
......@@ -1193,6 +1194,11 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfun
strcatW(wszApplicationName, wszParameters);
}
/* We set the default to open, and that should generally work.
But that is not really the way the MS docs say to do it. */
if (!sei_tmp.lpVerb)
sei_tmp.lpVerb = wszOpen;
retval = execfunc(wszApplicationName, NULL, FALSE, &sei_tmp, sei);
if (retval > 32)
return TRUE;
......@@ -1281,7 +1287,9 @@ HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
SHELLEXECUTEINFOA sei;
HANDLE hProcess = 0;
TRACE("\n");
TRACE("%p,%s,%s,%s,%s,%d\n",
hWnd, lpOperation, lpFile, lpParameters, lpDirectory, iShowCmd);
sei.cbSize = sizeof(sei);
sei.fMask = 0;
sei.hwnd = hWnd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment