mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[SHELL32] SEE_MASK_IDLIST should not assume the PIDL is always a FS path (#7693)
CORE-16898 CORE-14177
This commit is contained in:
parent
6265add147
commit
f335322ace
1 changed files with 11 additions and 4 deletions
|
@ -2076,10 +2076,10 @@ static BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
|
|||
if (sei_tmp.fMask & SEE_MASK_IDLIST &&
|
||||
(sei_tmp.fMask & SEE_MASK_INVOKEIDLIST) != SEE_MASK_INVOKEIDLIST)
|
||||
{
|
||||
LPCITEMIDLIST pidl = (LPCITEMIDLIST)sei_tmp.lpIDList;
|
||||
|
||||
CComPtr<IShellExecuteHookW> pSEH;
|
||||
|
||||
HRESULT hr = SHBindToParent((LPCITEMIDLIST)sei_tmp.lpIDList, IID_PPV_ARG(IShellExecuteHookW, &pSEH), NULL);
|
||||
|
||||
HRESULT hr = SHBindToParent(pidl, IID_PPV_ARG(IShellExecuteHookW, &pSEH), NULL);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = pSEH->Execute(&sei_tmp);
|
||||
|
@ -2087,7 +2087,14 @@ static BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
SHGetPathFromIDListW((LPCITEMIDLIST)sei_tmp.lpIDList, wszApplicationName);
|
||||
hr = SHGetNameAndFlagsW(pidl, SHGDN_FORPARSING, wszApplicationName, dwApplicationNameLen, NULL);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
if (dwApplicationNameLen)
|
||||
*wszApplicationName = UNICODE_NULL;
|
||||
if (!_ILIsDesktop(pidl))
|
||||
TRACE("Unable to get PIDL parsing path\n");
|
||||
}
|
||||
appKnownSingular = TRUE;
|
||||
TRACE("-- idlist=%p (%s)\n", sei_tmp.lpIDList, debugstr_w(wszApplicationName));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue