Commit e947844a authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

shell32: Implement SHBindToObject.

Based on SHBindToParent implementation. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8bdfb41e
......@@ -1333,6 +1333,41 @@ HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCI
return hr;
}
HRESULT WINAPI SHBindToObject(IShellFolder *psf, LPCITEMIDLIST pidl, IBindCtx *pbc, REFIID riid, void **ppv)
{
IShellFolder *psfDesktop = NULL;
HRESULT hr;
TRACE_(shell)("%p,%p,%p,%s,%p\n", psf, pidl, pbc, debugstr_guid(riid), ppv);
pdump(pidl);
if (!ppv)
return E_INVALIDARG;
*ppv = NULL;
if (!psf)
{
hr = SHGetDesktopFolder(&psfDesktop);
if (FAILED(hr))
return hr;
psf = psfDesktop;
}
if (_ILIsPidlSimple(pidl))
/* we are on desktop level */
hr = IShellFolder_QueryInterface(psf, riid, ppv);
else
hr = IShellFolder_BindToObject(psf, pidl, pbc, riid, ppv);
if (psfDesktop)
IShellFolder_Release(psfDesktop);
TRACE_(shell)("-- ppv=%p ret=0x%08x\n", *ppv, hr);
return hr;
}
/*************************************************************************
* SHParseDisplayName [SHELL32.@]
*/
......
......@@ -332,6 +332,7 @@
@ stdcall SHAddToRecentDocs (long ptr)
@ stdcall SHAppBarMessage(long ptr)
@ stdcall SHAssocEnumHandlers(wstr long ptr)
@ stdcall SHBindToObject(ptr ptr ptr ptr ptr)
@ stdcall SHBindToParent(ptr ptr ptr ptr)
@ stdcall SHBrowseForFolder(ptr) SHBrowseForFolderA
@ stdcall SHBrowseForFolderA(ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment