diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 95d5b1a2324..f3534d155a5 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -2369,10 +2369,3 @@ LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida) return dst; } - -HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, - IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi) -{ - FIXME("STUB: %p %p %p %p\n",pidlParent, psfParent, pidl, ppsi); - return E_NOINTERFACE; -} diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 53964a7dd1a..d16b35da5f0 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -174,3 +174,38 @@ HRESULT WINAPI IShellItem_Constructor(IUnknown *pUnkOuter, REFIID riid, void **p return ret; } + +HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, + IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi) +{ + ShellItem *This; + LPITEMIDLIST new_pidl; + HRESULT ret; + + TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi); + + if (!pidlParent && !psfParent && pidl) + { + new_pidl = ILClone(pidl); + if (!new_pidl) + return E_OUTOFMEMORY; + } + else + { + FIXME("(%p,%p,%p) not implemented\n", pidlParent, psfParent, pidl); + return E_NOINTERFACE; + } + + ret = IShellItem_Constructor(NULL, &IID_IShellItem, (void**)&This); + if (This) + { + *ppsi = (IShellItem*)This; + This->pidl = new_pidl; + } + else + { + *ppsi = NULL; + ILFree(new_pidl); + } + return ret; +}