32 位应用程序中的 WebBrowser 控件在 window.open() 调用上启动 64 位 Internet Explorer

发布于 2024-09-10 04:22:24 字数 437 浏览 1 评论 0原文

我有一个在 Windows 7 64 位上运行的 32 位应用程序。该应用程序(用 C++ 编写)托管一个 WebBrowser 控件。

当要求 WebBrowser 控件弹出一个新窗口(通过 javascript window.open() 调用)时,它会启动一个新的 Internet Explorer 进程。特别地,这个新的IE进程是64位IE进程。

由于网页喜欢 Adob​​e Flash,不幸的是,我需要确保启动的新 IE 进程是 32 位版本(这是我机器上的默认版本),以便可以显示 Adob​​eFlash 内容。

有趣的是,IE 本身(WebBrowser/MSHTML 的包装)不会遇到这个问题,这意味着可以设置某种配置来提示 WebBrowser 控件启动 32 位进程。

我应该寻找什么想法来确保 WebBrowser / MSHTML 创建正确的流程?

I have a 32bit application running on Windows 7 64bit. The application (written in C++) hosts a WebBrowser control.

When the WebBrowser control is asked to popup a new windows (through a javascript window.open() call), it launches a new Internet Explorer process. In particular, this new IE process is a 64bit IE process.

Since web pages love Adobe Flash, I unfortunately need to make sure new IE process that is launched is the 32bit version (which is the default on my machine), so that AdobeFlash content can be displayed.

Interestingly enough, IE itself (wrapper around WebBrowser/MSHTML) does not suffer this problem, implying there is some kind of configuration that could be set to hint to the WebBrowser control to launch a 32bit process.

Any ideas where I should be looking to ensure that WebBrowser / MSHTML create the right process?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

裂开嘴轻声笑有多痛 2024-09-17 04:22:24

我建议您处理 DWebBrowserEvents2::NewWindow2 事件。您可以在自己的进程中的 Web 浏览器控件中打开它,也可以在新的 CLSID_InternetExplorer 对象中打开它。

I suggest you to handle the DWebBrowserEvents2::NewWindow2 event. You can either open it in a webbrowser control in your own process, or in a new CLSID_InternetExplorer object.

冰雪之触 2024-09-17 04:22:24

这对于您的应用程序来说可能有点过分了,但对我来说,将平台目标更改为 x86 可以防止在控件或弹出窗口中使用 64 位 IE。

This might be overkill for your application, but for me, changing the Platform target to x86 prevents 64-bit IE from being used either in the controls or in popups.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文