[SHELL32] Implement basic SHMultiFileProperties (#7956)

CORE-12510 CORE-20217
This commit is contained in:
Whindmar Saksit 2025-06-08 20:04:10 +02:00 committed by GitHub
parent bec50f65f4
commit c7a7376545
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 610 additions and 271 deletions

View file

@ -402,6 +402,29 @@ SHELL_GetUIObjectOfAbsoluteItem(
return hr;
}
HRESULT
SHELL_DisplayNameOf(
_In_opt_ IShellFolder *psf,
_In_ LPCITEMIDLIST pidl,
_In_opt_ UINT Flags,
_Out_ PWSTR *ppStr)
{
HRESULT hr;
CComPtr<IShellFolder> psfRoot;
if (!psf)
{
PCUITEMID_CHILD pidlChild;
hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &psfRoot), &pidlChild);
if (FAILED(hr))
return hr;
psf = psfRoot;
pidl = pidlChild;
}
STRRET sr;
hr = psf->GetDisplayNameOf((PCUITEMID_CHILD)pidl, Flags, &sr);
return SUCCEEDED(hr) ? StrRetToStrW(&sr, pidl, ppStr) : hr;
}
/***********************************************************************
* DisplayNameOfW [SHELL32.757] (Vista+)
*/