IShellBrowser::BrowseObject method
Informs Windows Explorer to browse to another folder.
Syntax
HRESULT BrowseObject( PCUIDLIST_RELATIVE pidl, UINT wFlags );
Parameters
- pidl
-
Type: PCUIDLIST_RELATIVE
The address of an ITEMIDLIST (item identifier list) structure that specifies an object's location. This value is dependent on the flag or flags set in the wFlags parameter.
- wFlags
-
Type: UINT
Flags specifying the folder to be browsed. It can be zero or one or more of the following values.
These flags specify whether another window is to be created.
-
Use default behavior, which respects the view option (the user setting to create new windows or to browse in place). In most cases, calling applications should use this flag.
-
Browse to another folder with the same Windows Explorer window.
-
Creates another window for the specified folder.
The following flags specify the mode. These values are ignored if SBSP_SAMEBROWSER is specified or if SBSP_DEFBROWSER is specified and the user has selected Browse In Place.
-
Use the current window.
-
Specifies no folder tree for the new browse window. If the current browser does not match the SBSP_OPENMODE of the browse object call, a new window is opened.
-
Specifies a folder tree for the new browse window. If the current browser does not match the SBSP_EXPLOREMODE of the browse object call, a new window is opened.
-
Not supported. Do not use.
-
Do not transfer the browsing history to the new window.
The following flags specify the category of the pidl parameter.
-
An absolute PIDL, relative to the desktop.
-
A relative PIDL, relative to the current folder.
-
Browse the parent folder, ignore the PIDL.
-
Navigate back, ignore the PIDL.
-
Navigate forward, ignore the PIDL.
The following flags specify mode.
-
Windows Vista and later. Not supported. Do not use.
-
Windows Vista and later. Navigate without clearing the search entry field.
-
Windows Vista and later. Navigate without the default behavior of setting focus into the new view.
The following flags control how history is manipulated as a result of navigation.
-
Microsoft Internet Explorer 6 Service Pack 2 (SP2) and later. The navigation was possibly initiated by a webpage with scripting code already present on the local system.
-
Microsoft Internet Explorer 6 Service Pack 2 (SP2) and later. The new window is the result of a user initiated action. Trust the new window if it immediately attempts to download content.
-
Microsoft Internet Explorer 6 Service Pack 2 (SP2) and later. The window is navigating to an untrusted, non-HTML file. If the user attempts to download the file, do not allow the download.
-
Suppress selection in the history pane.
-
Write no history of this navigation in the history Shell folder.
-
0x00100000. Windows 7 and later. Do not add a new entry to the travel log. When the user enters a search term in the search box and subsequently refines the query, the browser navigates forward but does not add an additional travel log entry.
-
Microsoft Internet Explorer 6 Service Pack 2 (SP2) and later. The navigate should allow ActiveX prompts.
-
Windows Internet Explorer 7 and later. If allowed by current registry settings, give the browser a destination to navigate to.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Views can use this method to force Windows Explorer to browse to a specific place in the namespace. Typically, these are folders contained in the view.
Examples
IShellBrowser* psb;
hr = IUnknown_QueryService(punkSite, SID_STopLevelBrowser, IID_PPV_ARGS(&psb));
if (SUCCEEDED(hr))
{
hr = psb->BrowseObject(pidlSearch, SBSP_DEFBROWSER | SBSP_ABSOLUTE);
psb->Release();
}
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also