bho

IHTMLEventObj::put_keyCode fails in IE9 RC

♀尐吖头ヾ 提交于 2019-12-04 21:18:09
I have an IE BHO created over 3 years ago that uses IHTMLEventObj::put_keyCode function. This function has worked as documented in IE6, IE7 and IE8. However, when testing with IE9 RC it no longer works as documented. The function is called the same way and the result is S_OK, but the key does not show up in the input field. The call is being made in the DISPID_HTMLELEMENTEVENTS2_ONKEYPRESS even of my Invoke() function. I found someone with a similar problem: http://social.msdn.microsoft.com/Forums/is/ieextensiondevelopment/thread/abcbaffd-ed8a-45b8-840b-8ad8d7d10081 , however for some reason I

BHO for capturing user clicks works fine in Windows other than Windows 7 Home Premium with IE9

怎甘沉沦 提交于 2019-12-04 19:09:20
I have written a BHO for IE 8 and IE9 that binds and capture certain elements(e.g INPUT element) from a user's page on my website and instead of performing the click event, performs custom post processing and presents user with different options based the data attached to each div/input element on which user has clicked. Now the problem is: it works fine in the following configurations: Windows XP , IE 8 working Windows 7 Ultimate x86 , IE 8 - working Windows 7 Ultimate x64 , IE 8 - working Windows 7 Ultimate x86 , IE 9 working Windows 7 Ultimate x64 , IE 9 - working It is not working for the

Is there an IE notification box like gBrowser.getNotificationBox() in firefox

早过忘川 提交于 2019-12-04 19:08:44
A browser helper object I'm writing at the moment needs to alert the user of certain situations. I don't want to use the WinAPI function MessageBox, because it forces the user to click it away. Is there a possibillity to ask the user a question without blocking his workflow? He should be able to just ignore the question, if he isn't interested in it at the moment. Something like gBrowser.getNotificationBox() for firefox extensions would be ideal (example image appended). You can create your own window and use SetWindowPos to move it into the IE window. If you want to play safe, I suggest you

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

感情迁移 提交于 2019-12-04 18:38:23
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 IDispatchImpl<IHelloWorldBHO, &IID_IHelloWorldBHO, &LIBID_HelloWorldLib, /*wMajor =*/ 1, /*wMinor =*/ 0>, public IDispEventImpl<1, CHelloWorldBHO, &DIID_DWebBrowserEvents2, &LIBID_SHDocVw, 1, 1> { . . . BEGIN_SINK_MAP(CHelloWorldBHO) SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID

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

余生颓废 提交于 2019-12-04 18:15:36
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 in the topmost link/anchors, the 'href' for maps, videos, orkut etc. is not available (normally it is javascript:void(0) ). Has anyone any ideas how to capture it when the page is fully loaded rather than just when the frame/body is loaded? Thanks, UPDATE It seems

How to write simple background thread in CWorkerThread

孤街醉人 提交于 2019-12-04 16:37:51
I'm trying to asynchronously run function in my add-on for Internet Explorer (I'm writing BHO in VC++). As suggested here I'm trying to use CWorkerThread. I've been trying to figure it out for hours but still have no idea how to do it. I don't have much experience in ATL. The lack of a good documentations or tutorials on Internet is killing me. I'm creating class by Add->Class and choosing ATL Simple Object (that's how you add classed to ATL project right?). But how to implement this IWorkerThreadClient? I thought that choosing Add->Implement Interface in Class View would be good but there is

Javascript post message event handler in ATL C++ BHO

时光总嘲笑我的痴心妄想 提交于 2019-12-04 13:30:18
On a webpage I have a button with JavaScript post message. In my BHO IE add-on I need an event listener for this message event. Any clue how this can be done? My OnDocumentComplete is as below. Can you give some more pointers where we can write code for handling this event. I want to make a REST API call from this message handler. TestScript.h: // TestScript.h : Declaration of the CTestScript #pragma once #include "resource.h" // main symbols #include "TestBHO_i.h" #include <mshtml.h> // DOM interfaces #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS

How can I list the plugins (BHOs) that Internet Explorer uses, from my program?

青春壹個敷衍的年華 提交于 2019-12-04 09:39:49
问题 I need to retrieve, in my Win32 standalone program, a list of currently installed Internet Explorer add-ons (Browser Helper Objects), and - if possible - their enabled/disabled status. Since anti-spyware programs (or e.g. Autoruns) can get this list from somewhere, is there a simple way to request this list programatically ? EDIT : Thanks to @Stefan, who pointed me to the right registry keys ( all HKLM ): // BHOs HKLM\Software\Microsoft\Windows\CurrentVersion\explorer\Browser Helper Objects /

How to open a new tab from BHO?

主宰稳场 提交于 2019-12-04 06:35:53
问题 I would like to open a new tab from my BHO done in C#. Process.Start(u) opens a new window, not a tab, and call the default browsers, which might not be IE. I want to open the new tab to prompt the user to download and install the latest version of the BHO. 回答1: The correct way to do this from a BHO is to use IWebBrowser2::Navigate2() (doc link) and pass navOpenInNewTab (doc link). The interop exists at pinvoke.net, so you can probably start with that. You can get the IWebBrowser2 pointer

Securing a Browser Helper Object

萝らか妹 提交于 2019-12-04 04:36:49
I'm currently in the process of building a browser helper object. One of the things the BHO has to do is to make cross-site requests that bypass the cross-domain policy. For this, I'm exposing a __MyBHONameSpace.Request method that uses WebClient internally. However, it has occurred to me that anyone that is using my BHO now has a CSRF vulnerability everywhere as a smart attacker can now make arbitrary requests from my clients' computers. Is there any clever way to mitigate this? Rob W The only way to fully protect against such attacks is to separate the execution context of the page's