bho

How to concatenate 2 LPOLESTR

Hi, i want to concatenate 2 strings in c++, i can't use char*. I tried the following but doesn't work: #define url L"http://domain.com" wstring s1 = url; wstring s2 = L"/page.html"; wstring s = s1 + s2; LPOLESTR o = OLESTR(s); I need a string with s1 and s2 concatenated. Any info or website that explain more about this ? Thanks. ...

Delphi. How to monitor URLs being downloaded by IE?

When you're opening page in IE it downloads lots of files, including CSS, scripts, pictures, SWFs, etc. I need to develop small plugin which will monitor all these URLs and let's say save to file this list. I need it in Delphi, but any example in any other programming languages will be really appreciated. ...

Capturing HTML input values using a BHO

Hi all, i am a complete nobbie to BHO and C++. This is what i want to achieve. Using various code samples, i have been successful in installing a BHO in my Internet Explorer. I am currently making use of the Invoke method to search for DISPID_HTMLDOCUMENTEVENTS2_ONCLICK and have been successful in capturing the event. How can i acces...

Register a BHO through an NSIS installer

I have an IE BHO which I was packaging through the Visual Studio setup and deployment project. I now want to the package it through an NSIS installer. My BHO was registering in the following way: [ComRegisterFunctionAttribute] public static void Register(Type t) { string guid = t.GUID.ToString("B"); Registr...

Browser Helper Object Form Events

Why is it so hard to find information on browser helper objects? I'm trying to find how to get events from forms within Internet Explorer but get only so far as to get window events. I'll show my code if you need it. ...

How to supress the warning in IE's protected mode

I have a BHO which captures webpages as images and I run another process to pngcrush the images thus created. The problem that I face in UAC enabled systems is that everytime IE runs, I get a warning for the pngcrushing process that I spawn from the BHO. I read here - http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx#wpm_eleb...

C# IE BHO: How do I marshal DOM objects to a worker thread?

I am trying to write a Browser Helper Object (BHO) in C# that manipulates the DOM on a separate thread. I've seen several other questions related to this, and the answer seems to be "you need to marshal the DOM objects from the thread they were created on to your worker thread." Good advice, and it makes perfect sense, but I can find no ...

Internet Explorere BHO and SSL

Hello. I've developed IE plugin which adds an icon after each link on pages. But, If I navigate on https sites then I get the message that IE has restricted..... If I try to allow the access IE shows that message again. How can I fix it or where am I wrong ? ...

BHO memory leak

I've written a BHO based on this tutorial: http://www.codeproject.com/KB/cs/Attach_BHO_with_C_.aspx My GetSite and SetSite are identical to the tutorials listing. I am adding/removing an OnDocumentComplete handler and assigning SHDocVW.WebBrowser webBrowser inside the IObjectWithSite SetSite function for debugging purposes I've removed...

How to get access of <iframe> body using c++/ATL/COM?

Hi All, I have written a browser helper object to get the text between the tags and use it for data mining purpose. I tried using it on igoogle (basically to test its capability on gadgets) and it failed in some of the cases where an <iframe> is present with some external source. I can get the <div> and its child <iframe> but fail to ...

How to get complete HTML body using browser helper object (BHO) in case of DHTML/AJAX page?

Hi All I'm writing a BHO that analyze the HTML taken from the 'onDocumentComplete' event of 'DWebBrowserEvents2'. Currently it works fine, unless I have a DHTML/AJAX page, where HTML handle is delivered too soon. For sample, I tried using it on 'http://www.google.com'. From the 'onDocumentComplete' event I can get most of the page but ...

Result of IWebBrowser2->GetDocument() doesn't implement IHTMLDOMNode

I have a Browser Helper Object and want to do some operations on the DOM of a website. I am struggling on one strange thing right now, I hope somebody knows what is happening here. Let's assume I have the following code snippet somewhere in my Browser Helper Object and m_pBrowser holds the current IWebBrowser2: if (m_pBrowser) { CCo...

c++ reading and writing windows registry properly

So I have been stuck on this for a while... thought I got it to work, but it breaks sometimes and I am not sure of the exact reasons... I am not sure if this matters but I am writing this inside Browser Helper Object (BHO)... Is IE always 32 bit process, no matter whether it is running on 64 and 32 bit OS? so I want to be able to read ...

Want to enable BHO in a WebBrowser Control embedded in a standard C# App

I have a standard winforms C# app with a webbrowser control dragged onto it. We also have a C++ BHO that we generally interact with through COM when it runs inside IE7 or IE8. I don't see any way to tell the webbrowser control to load the BHO. The BHO doesn't show any GUI or anything, it just listens to the http traffic when used fro...

Installing BHO for current user only

I have a Browser Helper Object that I would like to be installable by limited (non-administrator) users. Unfortunately, it seems that the COM object must be registered in HKEY_LOCAL_MACHINE and it must be listed as BHO there as well. The respective HKEY_CURRENT_USER keys don't seem to have any effect. I also tried some well-known extens...

Writing to windows Event Log from within IE extension in Protected Mode - fails with Access Denied

In a BHO running within Internet Explorer on Windows 7 with Protected Mode On, I'm trying to write to the windows event log. I'm writing to a source that already exists, and it's in the Application Log so I don't see why this would be blocked. However, my call to System.Diagnostics.EventLog.WriteEntry("MySource", "Some message") fails wi...

Reorder IE Context Menu

Hi, We have developed an Internet Explorer Addon using BHO and C#. We added a few context menu actions (for the IE that are using the addon) as well. We've used the registery entries under the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\ to add the context menu entries. Is there a way to order the enntries? Or add a s...

Accessing data in a Frame or Iframe with IE plugin Browser Helper Object (BHO)

I am writing an IE plugin that wrap phone numbers in a link that connects to a phone system and dials that number when clicked. I am accomplishing this by using DocumentComplete event. //using SHDocVw.WebBrowser webBrowser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete); The problem is ...

DownloadComplete event does not been called by BHO

It seems that my program does not handle the DownloadComplete event. Can someone guide me where I did wrong? class ATL_NO_VTABLE CStockBar : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CStockBar, &CLSID_StockBar>, public IDeskBand, //public IObjectWithSite, public IObjectWithSiteImpl<CStockBar>, publ...

My BHO does not work properly. DocumentComplete does not trigger.

Hi. I am doing a BHO for Internet Explorer. The problem is only the SetSite is working. BUt the DocumentComplete does not been triggered. I need some help in pointing me what is I am doing wrong. Here is what I declared inside my header file: class ATL_NO_VTABLE CStockBar : public CComObjectRootEx<CComSingleThreadModel>, public CComCo...