bho

Modifying HTTP request and responses with a Browser Helper Object

I want to modify HTTP requests headers using an Internet Explorer Browser Helper Object. I basically need to change a few headers for every request, and then modify the response before it returns to the browser. I tried using the OnNavigate2 events, but those don't even give you access to all of the headers. I tried making an Asynchron...

How to create a sidebar in Internet explorer

I want to create a sidebar same as Firefox sidebar in IE, something similar to IE developer toolbar, IE http analyzer, .... Can anyone help me here? ...

How to find out what "kind" of document is being displayed in IE

Hi, i am using c# to create a button for IE and this button performs certain actions that all depend on the document being a PDF document. I am trying to setup a guard to prevent any action taking place if the document type is not a PDF but not sure how as IE hands over the document to adobe and reader takes charge. I am using both SHDoc...

Activate IE Add-Ons from an BHO

Hello! I've written two objects, a deskband toolbar and a bho for IE. The goal is that the bho shows up the toolbar after installation. Microsoft's approach is to use pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, 0); This method is nice to show and hide toolbars which got already activated via the addon manager but does not work for d...

Monitor data flowing between BHO and IE

Is there a way to monitor data flowing between BHO and IE? I am writing one BHO and its giving some issues . I have tried tools like fiddler which can monitor traffic between server and IE but can I monitor traffic flowing between BHO and IE. I am mostly interested in some tool. ...

Browser Helper Object UI

I am a newbie working towards developing an IE extension that would appear as an overlay in certain webpages. I am getting started by creating a simple BHO in VS2008 (using C++), but I am wondering how UI may be incorporated within the project. Any ideas? Just to give you an idea, I'm looking for overlays similar to what was developed by...

Handle HTMLElementEvents2 when DWebBrowserEvents2 has been handled using ATL's macros

I'm creating a Browser Helper Object using VS2008, C++. My class has been derived from IDispEventImpl among many others class ATL_NO_VTABLE CHelloWorldBHO : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CHelloWorldBHO, &CLSID_HelloWorldBHO>, public IObjectWithSiteImpl<CHelloWorldBHO>, public IDispatc...

What is a reliable way to monitor the beginning and end of a complete page load in IE, including all content?

I'm developing a plugin for IE (BHO and toolbar) which involves some modifications to the cache and content compression through an external service. I need to be able to show some graphs that demonstrate the bandwidth that is being saved by doing this on a per page basis, to include all of the images and other content on the page. Using...

How to identify an Explorer Bar(Internet Explorer) is hidden or not?

I can make an Explorer bar show/hide using IWebBrowser2::ShowBrowserBar Method. I want to use a single button to toggle between Show/Hide. There is a parameter for ShowBrowserBar to set for Show/Hide. How will I get the status of the explore bar now? ...

Windows 7 does not fire DISPID_BEFORENAVIGATE2 event?

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...

How to change Internet Explorer search assistant programmatically?

Folks, I am developing Browser Helper Object, that has to change search assistant URL in Internet Explorer 6. I have discovered on the web, that it can be done by writing new "Search assistant" value into registry "HKEYLOCALMACHINE\Software\Microsoft\Internet Explorer\Search". However when I write it manually nothing changes in IE beh...

Deploy BHO errors

Hello, I developed an BHO using C# .NET. Then I create an deployment project and testet the setup on a other machine. It fails with an error in german. translation is something like: cant register ieframe.dll HRESULT: -2147467263 ieframe.dll was recognized as an dependency and was added to the setup project automatically. actually I t...

BHO or Command Button for explorer

Hi I am trying to develop a command button that would appear on windows explorer. I can do this for an NSE but what I want to do is make the button visible on every explorer window. I want it to work for windows 7 and vista. I know it is possible as I have seen office Groove do it, and I am not sure if I have to implement the IExplorer(...

How to get the screen coordinate of web-page elements in BHO

Hi all, I am writing a BHO object for IE. I want the screen position of the top-left of the web-page. How can i get this position? The topleft of the first element in DOM returns (0,0). The webBrowser.Left or Top returns the position of the browser but not the top-left of the page. I am using IWebBrowser2. Thanks a million, -anony. ...

Prevent zoom in CDHTMLDialog (BHO on IE)

I have a CDHTMLDialog running in IE that has a fixed size that I chose, and runs in a fixed window to match this size. My problem is that the user can zoom on it (by ctrl-mousewheel) causing my html to be larger or smaller than the window which looks awkward and adds annoying scrollbars. Also, the user might use ctrl-+ or ctrl-- to cha...

Windows regions and transparency

I have a CDHTMLDialog in a BHO that I want to be partially transparent, in the sense that the transparent area changes according to the logic of the dialog. I got it to become transparent visually (using SetLayeredWindowAttributes), but it is critical to make this region truly transparent, because otherwise when I click on the transparen...

Handle when IE window moves - Visual C++

I want to handle window move events. My first try was to handle DWebBrowserEvents2::WindowSetHeight, WindowSetLeft, WindowSetTop and WindowSetWidth events, but for some reasons, these events didn't get fired at all.I've handled window resize by handling HTMLWindowEvents2::onresize. How would I handle when the window moves? I've also trie...

Finding the offset client position of an element

Hi all, How to find the offset client position of an element using Javascript? (I assume the same code can be written in a BHO or Gecko/NPAPI). The problem I am facing is a way to find out the offset client position of the element. The e.srcElement.offsetX/Y does not give the correct value always (same goes for clientX/Y). In some cas...

Listening to HTML Events from BHO

I've been working on a BHO/toolbar written in C# that listens to HTML events raised on the browser's current webpage. The solution includes a reusable class called HtmlPageEventManager whose purpose is to subscribe to a given list of HTML events for each new webpage that's opened. A goal is to attach handlers as soon as the user can be...

IHTMLSelectionObject.createRange() throws UnauthorizedAccessException

I wrote the following code for retrieving the selected text from the current webpage: IHTMLDocument2 mainDoc = ... for ( int i = 0; i < mainDoc.frames.length; i++ ) { object refIndex = i; var frame = (IHTMLWindow2)mainDoc.frames.item( ref refIndex ); IHTMLDocument2 frameDoc; try { frameDoc = frame.document; } ca...