I'm trying to subclass an IE window from my BHO using SetWindowLong. I'm testing with IE8 on WinXPSP3. Even when I try to use the HWND that I retrieve directly from the IWebBrowser2 passed into IObjectWithSite::SetSite, SetWindowLong still fails and GetLastError returns 5 (access denied). I thought this was exactly the type of issue that use of a BHO was supposed to avoid, since it is a DLL running in the same process as the browser.
Anyone have any idea why it isn't letting me subclass the window?