启用代理
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 1 )
DllCall("wininet.dll", "uint", "InternetSetOption", "ptr", 0, "dword", 37, "ptr", 0, "dword", 0)
直接连接
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 0)
DllCall("wininet.dll", "uint", "InternetSetOption", "ptr", 0, "dword", 37, "ptr", 0, "dword", 0)
DllCall 这一句是关键,用来刷新 InternetSetOption,使修改生效!
[ 本帖最后由 pw4321 于 2008-6-12 23:46 编辑 ] |