延迟过程事件的退出事件

时间:2018-03-05 12:02:16

标签: c# .net internet-explorer shdocvw

我有这段代码:

Process internetExplorerProcess = Process.Start("iexplore", "-noframemerging about:blank");
internetExplorerProcess.EnableRaisingEvents = true;
internetExplorerProcess.Exited += OnInternetExplorerProcessExited;

在这种情况下,退出的事件会立即执行。

如果我们更改第一行以打开网页而不是空白页面:

 Process internetExplorerProcess = Process.Start("iexplore", "-noframemerging www.stackoverflow.com");

在某些机器中,退出的事件不会立即运行,最多可能需要20秒。

额外信息:

如果在延迟期间我们打开任务管理器并强制杀死iexplore事件被触发,似乎某些外部进程阻止了iexplore的关闭。

我们已经使用反恶意软件工具检查了机器,一切正常。

1 个答案:

答案 0 :(得分:0)

我按照Anton Komyshan所说的帖子中所示的步骤并没有解决问题,但他帮我找到了问题,谢谢。

最后在重新配置iexplore之后,默认情况下删除了插件和配置,问题就解决了。

相关问题