mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 23:53:07 +00:00
- Pass the directory of the file to ShellExecuteExW
svn path=/trunk/; revision=37797
This commit is contained in:
parent
b4a3a4d8e3
commit
6d553afec5
1 changed files with 4 additions and 0 deletions
|
@ -1506,6 +1506,7 @@ DoStaticShellExtensions(
|
||||||
{
|
{
|
||||||
STRRET strFile;
|
STRRET strFile;
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
|
WCHAR szDir[MAX_PATH];
|
||||||
SHELLEXECUTEINFOW sei;
|
SHELLEXECUTEINFOW sei;
|
||||||
PStaticShellEntry pCurrent = This->shead;
|
PStaticShellEntry pCurrent = This->shead;
|
||||||
int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst;
|
int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst;
|
||||||
|
@ -1527,6 +1528,8 @@ DoStaticShellExtensions(
|
||||||
if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) != S_OK)
|
if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) != S_OK)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
wcscpy(szDir, szPath);
|
||||||
|
PathRemoveFileSpec(szDir);
|
||||||
|
|
||||||
ZeroMemory(&sei, sizeof(sei));
|
ZeroMemory(&sei, sizeof(sei));
|
||||||
sei.cbSize = sizeof(sei);
|
sei.cbSize = sizeof(sei);
|
||||||
|
@ -1536,6 +1539,7 @@ DoStaticShellExtensions(
|
||||||
sei.nShow = SW_SHOWNORMAL;
|
sei.nShow = SW_SHOWNORMAL;
|
||||||
sei.lpVerb = pCurrent->szVerb;
|
sei.lpVerb = pCurrent->szVerb;
|
||||||
sei.lpFile = szPath;
|
sei.lpFile = szPath;
|
||||||
|
sei.lpDirectory = szDir;
|
||||||
ShellExecuteExW(&sei);
|
ShellExecuteExW(&sei);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue