mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 22:50:43 +00:00
shell32: Implement IExplorerBrowser::BrowseToObject.
This commit is contained in:
parent
ecb02ec9b7
commit
00889f1723
@ -633,9 +633,21 @@ static HRESULT WINAPI IExplorerBrowser_fnBrowseToObject(IExplorerBrowser *iface,
|
||||
IUnknown *punk, UINT uFlags)
|
||||
{
|
||||
ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
|
||||
FIXME("stub, %p (%p, 0x%x)\n", This, punk, uFlags);
|
||||
LPITEMIDLIST pidl;
|
||||
HRESULT hr;
|
||||
TRACE("%p (%p, 0x%x)\n", This, punk, uFlags);
|
||||
|
||||
return E_NOTIMPL;
|
||||
if(!punk)
|
||||
return IExplorerBrowser_fnBrowseToIDList(iface, NULL, uFlags);
|
||||
|
||||
hr = SHGetIDListFromObject(punk, &pidl);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = IExplorerBrowser_BrowseToIDList(iface, pidl, uFlags);
|
||||
ILFree(pidl);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IExplorerBrowser_fnFillFromObject(IExplorerBrowser *iface,
|
||||
|
@ -760,6 +760,7 @@ static void test_navigation(void)
|
||||
{
|
||||
IExplorerBrowser *peb, *peb2;
|
||||
IFolderView *pfv;
|
||||
IShellItem *psi;
|
||||
IShellFolder *psf;
|
||||
LPITEMIDLIST pidl_current, pidl_child;
|
||||
DWORD cookie, cookie2;
|
||||
@ -920,6 +921,38 @@ static void test_navigation(void)
|
||||
lres = IExplorerBrowser_Release(peb);
|
||||
ok(lres == 0, "Got lres %d\n", lres);
|
||||
|
||||
/* BrowseToObject tests */
|
||||
ebrowser_instantiate(&peb);
|
||||
ebrowser_initialize(peb);
|
||||
|
||||
/* Browse to the desktop by passing an IShellFolder */
|
||||
hr = SHGetDesktopFolder(&psf);
|
||||
ok(hr == S_OK, "Got 0x%08x\n", hr);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psf, SBSP_DEFBROWSER);
|
||||
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||
if(hr == S_OK) process_msgs();
|
||||
|
||||
IShellFolder_Release(psf);
|
||||
}
|
||||
|
||||
/* Browse to the current directory by passing a ShellItem */
|
||||
hr = pSHCreateShellItem(NULL, NULL, pidl_current, &psi);
|
||||
ok(hr == S_OK, "Got 0x%08x\n", hr);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psi, SBSP_DEFBROWSER);
|
||||
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||
process_msgs();
|
||||
|
||||
IShellItem_Release(psi);
|
||||
}
|
||||
|
||||
IExplorerBrowser_Destroy(peb);
|
||||
lres = IExplorerBrowser_Release(peb);
|
||||
ok(lres == 0, "Got lres %d\n", lres);
|
||||
|
||||
/* Cleanup */
|
||||
RemoveDirectoryW(child_path);
|
||||
ILFree(pidl_current);
|
||||
|
Loading…
Reference in New Issue
Block a user