是否有可能“沙盒”IE在Windows的形式? [英] Is it possible to 'sandbox' IE in a windows form?

查看:136
本文介绍了是否有可能“沙盒”IE在Windows的形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有一个Windows表单内webbrowsercontrol,并从形式的安全站点用户登录。如果用户是单独打开IE浏览器,它也将显示他们登录。是否可以隔离Windows窗体的IE实例?

Say I have a webbrowsercontrol inside a windows form, and the user logs in to a secure site from the form. If the user were to open IE separately, it would also show them logged in. Is it possible to isolate the windows form's IE instance?

推荐答案

WebBrowser控件是建立在web浏览器ActiveX,它坐落在WinInet的顶部之上。所以,你应该能够影响通过WinInet的API其行为。

The WebBrowser control is built on top of the WebBrowser ActiveX, which lies on top of the WinInet. So you should be able to affect its behavior through the WinInet API.

您可以尝试调用的 InternetSetOption WinInet的API来设置的 INTERNET_OPTION_END_BROWSER_SESSION 选项结束当前会话并开始新的。为了保证通话将只影响当前进程,使用的 INTERNET_HANDLE_TYPE_INTERNET 处理。

You can try calling InternetSetOption WinInet API to set the INTERNET_OPTION_END_BROWSER_SESSION option to end the current session and start new one. To ensure that the call will affect only the current process, use the INTERNET_HANDLE_TYPE_INTERNET handle.

这篇关于是否有可能“沙盒”IE在Windows的形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆