shell32: Partially implement SHCreateShellItem.

This commit is contained in:
Vincent Povirk 2009-02-18 12:32:00 -06:00 committed by Alexandre Julliard
parent e69c663c66
commit 9b9325fbd1
2 changed files with 35 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;
}