Windows 7 - Get IExplorerBrowser from a Windows Explorer (Vista)

Asked By Ivo Beltchev
07-Nov-09 01:32 PM
Hi

I am developing a band for Windows Explorer and I want to get notified
when the current folder changes. Looks like IExplorerBrowser provides
the notifications I need, but I cannot get that interface in my SetSite
function. I can get IShellBrowser:

STDMETHODIMP CExplorerBand::SetSite( IUnknown* pUnkSite )
{
if(pUnkSite)
{
CComQIPtr<IServiceProvider> pProvider=pUnkSite;

CComPtr<IShellBrowser> pShellBrowser;
if (pProvider)

pProvider->QueryService(SID_SShellBrowser,IID_IShellBrowser,(void**)&pShellBrowser);
}
return S_OK;
}

But I do not know what to do to get IExplorerBrowser. I tried
QueryInterface on pUnkSite and on pShellBrowser. I tried calling
QueryService with IID_IExplorerBrowser and different service IDs.
Nothing seems to work.

I am starting to think that IExplorerBrowser is only intended to be used
to host an explorer window in your own application because there are
many examples how to create a new instance but not how to get an
existing instance.

Any ideas?

Thanks
Ivo
FBar.InternetExplorer
(1)
Vista
(1)
CComQIPtr
(1)
VB
(1)
WebViewFolderContents
(1)
IWebBrowserAppand
(1)
IWebBrowserApp
(1)
IServiceProvider
(1)
  mayayana replied to Ivo Beltchev
07-Nov-09 05:25 PM
You need to QueryInterface on IWebBrowserApp
and IWebBrowser2. I have code but it is in VB6, so
probably not much help to you, but here is the snippet:

Private UK1 As IUnknown
Dim ISP As IServiceProvider
Dim WB1 As UUID
Dim WB2 As UUID

Set UK1 = pUnkSite
Set ISP = pUnkSite

CLSIDFromString IID_IWebBrowserApp, WB1
CLSIDFromString IID_IWebBrowser2, WB2

Set FBar.InternetExplorer = ISP.QueryService(VarPtr(WB1), VarPtr(WB2))

That gives you the new shell folder as a
of that is the WebViewFolderContents, AKA
ShellFolderView, which provides the
SelectionChanged event. You probably also
want that.

I hope that is clear. I know the VB terminology
is different but I do not know how to explain it
in C++ terms.

pProvider->QueryService(SID_SShellBrowser,IID_IShellBrowser,(void**)&pShellB
rowser);
  mayayana replied to mayayana
07-Nov-09 05:37 PM
Woops. That should be QueryService, of course,
not QueryInterface.
  Ivo Beltchev replied to mayayana
07-Nov-09 05:56 PM
Thanks. I was able to get it to work using IWebBrowser2 and hooking to
the web document events. I was hoping to use IExplorerBrowser instead
because the event API looked a lot simpler.
help
File share Vista-Vista Windows 7 Hi! I have a Vista network consisting of 2 computers running vista business. One computer is wireless and one wired, both connected to a Netgear MR814v2 router works fine. Do anyone have a solution or heard of this problem? tnx Per Windows Vista Networking Discussions Vista (1) GB (1) SD (1) MR (1) Error (1) Files (1) Computers (1) Problem (1 to do with the card being formatted by my Kodak camera. - - lshead keywords: File, share, Vista-Vista description: Hi! I have a Vista network consisting of 2 computers running vista business. One
Can't Network Vista-Vista-Mac Windows 7 I have 2 machines running Vista and 1 running Mac Leopard. I can't get them to play nice. The wireless to the internet through my Mac (airport). All computers can access the internet. My desktop (vista) can reach a mac location I created by adding a network location on my computer. My laptop (vista) can't reach the Mac at all. The worst part about it is that my 2 vista machines won't connect to each other! I see the icon for each in my network, but when I click on them I get errors. One vista has McAfee and one had Norton360. My settings (on both vistas) are: Private Network File Media Sharing On Can anyone help me? It's so frustrating having 2 pc with Vista sitting 5 feet from each other and I can't share ym own files. Security
Vista Not Playing Nice - Sharing Files Windows 7 Here's the problem: Vista Ultimate (non SP1) on desktop PC approved to run Vista. Vista Business (non SP1) on laptop approved to run Vista. When desktop had XP and the laptop had Vista I had no trouble sharing files / folders. Right after Vista was installed on the desktop (before a random reboot) I could share files / folders between both Vista PCs. Now I can't share files / folders. I have enabled file and printer sharing
Forward and backward compatibility from XP to Vista & Vista to Xp Windows 7 Vista movie maker creates files that, as the popup says in XP when trying to open a version of windows movie maker that is no longer supported"; XP Not forward compatible. Vista not supported? Can Vista make backward compatible files? As for Movie files created on XP running on Vista, I am disapointed to say that Vista backward compatibility is not present as well. This compatibility issues is not limited just to operating systems, Such as PC games purchaced at the store or downloaded. Where are the Vista backward patches? Where are the XP forward patches. Must we all be forced to upgrade