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!
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: API Hook on a COM object function?This will route navigations in ALL
IShellBrowser
instances through your detour. But,IShellBrowser
extendsIOleWindow
, so you can useIOleWindow::GetWindow
andSendMessage
to work with an individualIShellBrowser
instance whose window you've subclassed.