views:

303

answers:

2

I have a BHO that is supposed to intercept the DISPID_BEFORENAVIGATE2 events when Windows Explorer is browsing the local disks. It works well in XP and Vista, but stopped working in Windows 7 RC.

Turns out, Windows 7 RC stopped sending the DISPID_BEFORENAVIGATE2 events when the local folders are browsed! It does send other events to my BHO (such as DISPID_DOWNLOADBEGIN, etc.), but I need DISPID_BEFORENAVIGATE2.

Can anyone confirm this and/or offer a possible workaround?

Thanks!

A: 

Andrei, when you say "Microsoft, why are you doing this to me?" I can so sympathize. This kinda thing really makes me so reluctant to code against MS interfaces sometimes.

Ben
A: 

Well, it's over a year late, but here's a workaround: Simply set an API hook on IShellBrowser::BrowseObject using an API hook library such as MinHook. See here for sample code that does this: http://stackoverflow.com/questions/3692836/

This will route navigations in ALL IShellBrowser instances through your detour. But, IShellBrowser extends IOleWindow, so you can use IOleWindow::GetWindow and SendMessage to work with an individual IShellBrowser instance whose window you've subclassed.

Paul Accisano

related questions