Author: janderwald
Date: Mon Dec 1 10:51:59 2008
New Revision: 37797
URL:
http://svn.reactos.org/svn/reactos?rev=37797&view=rev
Log:
- Pass the directory of the file to ShellExecuteExW
Modified:
trunk/reactos/dll/win32/shell32/shv_def_cmenu.c
Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Mon Dec 1 10:51:59 2008
@@ -1506,6 +1506,7 @@
{
STRRET strFile;
WCHAR szPath[MAX_PATH];
+ WCHAR szDir[MAX_PATH];
SHELLEXECUTEINFOW sei;
PStaticShellEntry pCurrent = This->shead;
int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst;
@@ -1527,6 +1528,8 @@
if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) != S_OK)
return E_FAIL;
+ wcscpy(szDir, szPath);
+ PathRemoveFileSpec(szDir);
ZeroMemory(&sei, sizeof(sei));
sei.cbSize = sizeof(sei);
@@ -1536,6 +1539,7 @@
sei.nShow = SW_SHOWNORMAL;
sei.lpVerb = pCurrent->szVerb;
sei.lpFile = szPath;
+ sei.lpDirectory = szDir;
ShellExecuteExW(&sei);
return S_OK;