[SHELL32] Add FolderItems3 support (move/copy directory tree) (#9235)

- Added copy/move support for FolderItems collections.
- Added support for InvokeVerbEx on FolderItems collections.
- Added filter support for FolderItems collections.
This commit is contained in:
Whindmar Saksit
2026-07-16 15:58:14 +02:00
committed by GitHub
parent 1b460291e2
commit a5f51269c8
19 changed files with 499 additions and 134 deletions
+31
View File
@@ -359,6 +359,20 @@ interface IShellFolder2 : IShellFolder
HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
}
/*****************************************************************************
* IParentAndItem interface
*/
[
object,
uuid(b3a4b685-b685-4805-99d9-5dead2873236),
pointer_default(unique)
]
interface IParentAndItem : IUnknown
{
HRESULT SetParentAndItem([in] PCIDLIST_ABSOLUTE pidlParent, [in] IShellFolder*psf, [in] PCUITEMID_CHILD pidlChild);
HRESULT GetParentAndItem([out, optional] PIDLIST_ABSOLUTE *ppidlParent, [out, optional] IShellFolder **ppsf, [out, optional] PITEMID_CHILD *ppidlChild);
}
/*****************************************************************************
* IShellItem interface
*/
@@ -481,6 +495,23 @@ interface IShellItem2 : IShellItem
[out] BOOL *pf);
}
/*****************************************************************************
* IRelatedItem interface
*/
[
object,
uuid(a73ce67a-8ab1-44f1-8d43-d2fcbf6b1cd0),
pointer_default(unique)
]
interface IRelatedItem : IUnknown
{
HRESULT GetItemIDList([out] PIDLIST_ABSOLUTE *ppidl);
HRESULT GetItem([out] IShellItem **ppsi);
}
/*****************************************************************************
* INewWindowManager interface
*/
typedef enum tagNWMF {
NWMF_UNLOADING = 0x0001,
NWMF_USERINITED = 0x0002,
+7 -7
View File
@@ -459,23 +459,23 @@ HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, T4
}
#endif // DECLARE_CLASSFACTORY (ATL)
template<class P, class R> static HRESULT SHILClone(P pidl, R *ppOut)
static inline HRESULT SHILClone(LPCITEMIDLIST pidl, LPITEMIDLIST *ppOut)
{
R r = *ppOut = (R)ILClone((PIDLIST_RELATIVE)pidl);
LPITEMIDLIST r = *ppOut = ILClone((PIDLIST_RELATIVE)pidl);
return r ? S_OK : E_OUTOFMEMORY;
}
template<class P, class R> static HRESULT SHILCloneParent(P pidl, R *ppOut)
static inline HRESULT SHILCloneParent(LPCITEMIDLIST pidl, LPITEMIDLIST *ppOut)
{
R r = *ppOut = (R)ILClone((PIDLIST_RELATIVE)pidl);
LPITEMIDLIST r = *ppOut = ILClone((PIDLIST_RELATIVE)pidl);
if (r)
ILRemoveLastID(r); // "c:\folder\thisitem" => "c:\folder"
return r ? S_OK : E_OUTOFMEMORY;
}
template<class B, class R> static HRESULT SHILCombine(B base, PCUIDLIST_RELATIVE sub, R *ppOut)
static inline HRESULT SHILCombine(LPCITEMIDLIST base, PCUIDLIST_RELATIVE sub, LPITEMIDLIST *ppOut)
{
R r = *ppOut = (R)ILCombine((PCIDLIST_ABSOLUTE)base, sub);
LPITEMIDLIST r = *ppOut = ILCombine((PCIDLIST_ABSOLUTE)base, sub);
return r ? S_OK : E_OUTOFMEMORY;
}
@@ -919,7 +919,7 @@ static inline void DumpIdListOneLine(LPCITEMIDLIST pidl)
{
if (!depth)
{
wsprintfA(buf, "%p [] (%s)\n", pidl, pidl ? "Empty/Desktop" : "NULL");
wsprintfA(buf, "%p [] (%s)", pidl, pidl ? "Empty/Desktop" : "NULL");
OutputDebugStringA(buf);
}
break;