问题标签 [bho]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 如何访问
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 get the body.
I get the frame collection from this API HRESULT IHTMLDocument2::get_frames(IHTMLFramesCollection2 **p);
The problem can be re-created in igoogle and firefox using the loan calculator gadget. You will also need the fire bug extension to debug the page. For reference purpose I am pasting the sample here...
The link is not complete as I have replaced some part of the src with .... Now as you can see that there is no body for the although it is getting rendered in the browser..
As per this post ( http://stackoverflow.com/questions/957133/does-body-onload-wait-for-iframes ) the onload event on body does not wait for frames to complete.
So I can conclude that I have to use some sort onload listener for the <iframe>... but I am not sure how ...
Kindly suggest a way/snippet to retrieve the body of the <iframe> using ATL/COM APIs...
** Update **
I am using the following code to get the <iframes>. Although i get the iframe collection but when i try to get their body it fails... may be because they are not loaded by that time ?!
And,
#xA;Any suggestions, how to get the iframe body .... by the way I am handling this in OnDocumentComplete event...
Thanks,
c++ - 在 DHTML/AJAX 页面的情况下,如何使用浏览器帮助对象 (BHO) 获取完整的 HTML 正文?
我正在编写一个 BHO 来分析'onDocumentComplete'从'DWebBrowserEvents2'. 目前它工作正常,除非我有一个DHTML/AJAX页面,其中 HTML 句柄交付得太早。
对于示例,我尝试在'http://www.google.com'. 从'onDocumentComplete'事件中,我可以获得大部分页面,但在最顶部的链接/锚点中,'href' 地图、视频、orkut 等不可用(通常是javascript:void(0))。
有没有人知道如何在页面完全加载时而不是在框架/正文加载时捕获它?
谢谢,
更新
MSHTML API 似乎存在一些问题。我在 MSDN 论坛上发布了同样的问题并做出了一些回应。我也详细说明了我的问题和发现......
如果有人找到解决此问题的方法,请分享...
谢谢,
windows - c++正确读写windows注册表
所以我已经坚持了一段时间......以为我让它工作了,但它有时会中断,我不确定确切的原因......
我不确定这是否重要,但我在 Browser Helper Object (BHO) 中编写它... IE 是否总是 32 位进程,无论它是否在 64 位和 32 位操作系统上运行?
所以我希望能够从注册表中读取一个我可能需要创建的键......
我使用这个功能:
然后我检查密钥是否存在:
如果成功,那么我确保它是空终止的:
否则我使用 wininet lib 将信息发送到我的服务器,分配新的 ext_id,然后我将这个值写入注册表......使用这个函数:
出于某种奇怪的原因,它只写了我通过的东西的一半,所以我将 _tcslen(ext_id) 加倍并添加了 1 以确保安全?我在网上找到的大多数例子都没有那个长度乘以 2,它对我来说就像这样,所以我不理会它......
似乎这一切都正常工作:
它适用于我的 dev_machine:Windows 7 64bit。
在 32 位 Windows 7 上测试它...
这个问题出现在 Windows XP IE 6 上,它不起作用,但似乎如果我再次调用 RegQueryValueEx 函数,它会返回正确的值,所以我在下一个请求时注意到了......
我还注意到,根据我发送到服务器的其他字符串,它的工作方式会有所不同,这可能是因为我对 C++ 比较陌生,(实际上只有几个星期),我确信我是做错事。
哦,我在 msdn 上读到,我需要在标志中使用 KEY_WOW64_32KEY 或 KEY_WOW64_64KEY,根据情况打开注册表项......但这在我的情况下真的有必要吗(浏览器 6.0 到 8.0 的 BHO)
c# - 想要在嵌入标准 C# 应用程序的 WebBrowser 控件中启用 BHO
我有一个标准的 winforms C# 应用程序,上面有一个 webbrowser 控件。我们还有一个 C++ BHO,当它在 IE7 或 IE8 中运行时,我们通常通过 COM 与之交互。
我看不到任何方法可以告诉 webbrowser 控件加载 BHO。BHO 不显示任何 GUI 或任何东西,它只是在从 IE 使用时侦听 http 流量。
任何帮助将不胜感激。谢谢。
.net - 在保护模式下从 IE 扩展中写入 Windows 事件日志 - 失败并拒绝访问
在启用保护模式的 Windows 7 上的 Internet Explorer 中运行的 BHO 中,我正在尝试写入 Windows 事件日志。我正在写一个已经存在的源,它在应用程序日志中,所以我不明白为什么会被阻止。但是,我的调用System.Diagnostics.EventLog.WriteEntry("MySource", "Some message")失败并出现 InvalidOperationException,并显示消息“无法打开源 'XXX' 的日志。您可能没有写入权限。”。堆栈跟踪表明它位于EventLog.OpenForWrite(String currentMachineName).
关闭保护模式使其工作正常。
在保护模式下不允许这样做的任何原因,以及我可以将我的 BHO 注册为允许写入事件日志或以其他方式使其工作的任何方式?
根据这篇文章,对 OpenForWrite() 的调用会导致对 的调用UnsafeNativeMethods.RegisterEventSource(this.machineName, this.sourceName);,但该文档并没有让我进一步了解。
我正在使用.net 2.0
谢谢。
internet-explorer - 重新排序 IE 上下文菜单
我们使用 BHO 和 C# 开发了一个 Internet Explorer 插件。我们还添加了一些上下文菜单操作(对于使用插件的 IE)。我们使用了 HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\ 下的注册条目来添加上下文菜单条目。有没有办法订购条目?还是加个分隔符?还是嵌套菜单?目前,它们都按字母顺序排列。非常感谢!
c# - 使用 IE 插件 Browser Helper Object (BHO) 访问 Frame 或 Iframe 中的数据
我正在编写一个 IE 插件,它将电话号码包装在一个链接中,该链接连接到电话系统并在单击时拨打该号码。我通过使用 DocumentComplete 事件来实现这一点。
问题是我似乎无法访问框架和 iframe 元素内的元素。
问题:如何使用浏览器帮助对象在 IE 中操作框架和 iframe 元素内的数据?
visual-c++ - BHO 未调用 DownloadComplete 事件
看来我的程序没有处理 DownloadComplete 事件。有人可以指导我哪里做错了吗?
visual-c++ - 我的 BHO 无法正常工作。DocumentComplete 不触发
我正在为 Internet Explorer 做 BHO。问题是只有 SetSite 正在工作。BUt DocumentComplete 没有被触发。我需要一些帮助来指出我做错了什么。
这是我在头文件中声明的内容:
这是我的 SetSite 和 DocumentComplete 函数:
c# - BHO 和服务之间的 C# IPC
我似乎找不到在我的 IE C# BHO 和作为 SYSTEM 运行的 C# 控制台应用程序之间进行通信的方法。
到目前为止,我已经尝试使用 Remoting 和 EventWaitHandle,但是当我在 Win 7 中打开 UAC 的默认设置时,两者都给我“拒绝访问”错误。
我已经能够拥有一个使用 Remoting 和 EventWaitHandle 与服务通信的控制台应用程序。
我需要一种在启用 UAC 的两个进程之间共享数据的方法,我有哪些选择?