检测Windows(IE)代理设置更改 [英] Detect Windows (IE) proxy settings changes

查看:127
本文介绍了检测Windows(IE)代理设置更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序启动时,我正在使用WinHttpGetIEProxyConfigForCurrentUser和朋友收集当前的代理信息,因为每次请求似乎都会大大降低性能,因为它需要花费几秒钟的时间来收集代理数据.有没有一种方法可以检测Windows代理设置何时发生更改,以便我可以缓存信息直到更改为止?

I'm using WinHttpGetIEProxyConfigForCurrentUser and friends to gather the current proxy information when my app starts as doing it before each request seems to degrade performance greatly with it something sitting for a few seconds gathering the proxy data. Is there a way to detect when the Windows proxy settings have changed so I can cache the information until it changes?

谢谢, J

推荐答案

不确定是否有更好的方法,但是您始终可以选择使用核选项,并在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings中使用RegNotifyChangeKeyValue.

Not sure if there is a better way, but you could always take the nuclear option and use RegNotifyChangeKeyValue with HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings.

这篇关于检测Windows(IE)代理设置更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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