mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:13:01 +00:00
[SHELL32] Support CSIDL_FLAG_NO_ALIAS (#4381)
Adding the CSIDL_FLAG_NO_ALIAS flag to SHGetSpecialFolderLocation should return the physical PIDL if possible. CORE-18079
This commit is contained in:
parent
c5f6e744e7
commit
6cb1e57a63
1 changed files with 12 additions and 0 deletions
|
@ -2888,6 +2888,9 @@ HRESULT WINAPI SHGetFolderLocation(
|
||||||
LPITEMIDLIST *ppidl)
|
LPITEMIDLIST *ppidl)
|
||||||
{
|
{
|
||||||
HRESULT hr = E_INVALIDARG;
|
HRESULT hr = E_INVALIDARG;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
WCHAR szPath[MAX_PATH];
|
||||||
|
#endif
|
||||||
|
|
||||||
TRACE("%p 0x%08x %p 0x%08x %p\n",
|
TRACE("%p 0x%08x %p 0x%08x %p\n",
|
||||||
hwndOwner, nFolder, hToken, dwReserved, ppidl);
|
hwndOwner, nFolder, hToken, dwReserved, ppidl);
|
||||||
|
@ -2897,6 +2900,15 @@ HRESULT WINAPI SHGetFolderLocation(
|
||||||
if (dwReserved)
|
if (dwReserved)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if ((nFolder & CSIDL_FLAG_NO_ALIAS) &&
|
||||||
|
SHGetSpecialFolderPathW(hwndOwner, szPath, (nFolder & CSIDL_FOLDER_MASK), FALSE))
|
||||||
|
{
|
||||||
|
*ppidl = ILCreateFromPathW(szPath);
|
||||||
|
if (*ppidl)
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* The virtual folders' locations are not user-dependent */
|
/* The virtual folders' locations are not user-dependent */
|
||||||
*ppidl = NULL;
|
*ppidl = NULL;
|
||||||
switch (nFolder & CSIDL_FOLDER_MASK)
|
switch (nFolder & CSIDL_FOLDER_MASK)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue