Activating IE proxy settings...?
-
Hello, Not sure if this question belongs here... I have a web server (a service) that acts as a proxy to translate web pages from English to Swedish. In order for this to work, I need to set the appropriate values of proxy server and port and activate "Use a proxy server" in IE->Internet Options->Connections->LAN Settings->Advanced. Now, activating and deactivating frequently will become a pain in the ass jumping to the options dialog all the time, so I figured I could create an IE toolbar button that would do this programmatically. This turned out to be more complicated than I thought... I can change the options programmatically (at IE runtime) but the changes don't seem to be reflected appropriately. I was trying to simulate the [de]activation behaviour of IE when doing it manually, but something seems to be missing. Manually my proxy kicks in just fine, but not programmtically... all options are set and visually it all looks fine. Has somebody dealt with this or does anyone know how to do this? ANy pointers to material on this would be appreciated, TIA, /Tommy
-
Hello, Not sure if this question belongs here... I have a web server (a service) that acts as a proxy to translate web pages from English to Swedish. In order for this to work, I need to set the appropriate values of proxy server and port and activate "Use a proxy server" in IE->Internet Options->Connections->LAN Settings->Advanced. Now, activating and deactivating frequently will become a pain in the ass jumping to the options dialog all the time, so I figured I could create an IE toolbar button that would do this programmatically. This turned out to be more complicated than I thought... I can change the options programmatically (at IE runtime) but the changes don't seem to be reflected appropriately. I was trying to simulate the [de]activation behaviour of IE when doing it manually, but something seems to be missing. Manually my proxy kicks in just fine, but not programmtically... all options are set and visually it all looks fine. Has somebody dealt with this or does anyone know how to do this? ANy pointers to material on this would be appreciated, TIA, /Tommy
Tommy Svensson wrote: Has somebody dealt with this or does anyone know how to do this? what exactly are you changing??? Are you just setting the value in teh registry or are you going about it a different way?
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks] "It's The Soapbox; topics are optional" Shog 9
-
Tommy Svensson wrote: Has somebody dealt with this or does anyone know how to do this? what exactly are you changing??? Are you just setting the value in teh registry or are you going about it a different way?
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks] "It's The Soapbox; topics are optional" Shog 9
Brian Delahunty wrote: what exactly are you changing??? Are you just setting the value in teh registry or are you going about it a different way? I'm changing the values (ProxyServer and ProxyEnable) in the registry (HKCU/Soft/MS/Windows/CurrentWindows/Internet Settings). To be sure things are really changed I'm also calling InternetQueryOption and InternetSetOption with values set from the registry. The reg settings are notified to IE through
SendNotifyMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0x1F,
reinterpret_cast(_T("Software\\Microsoft\\Internet Explorer")));But this doesn't seem to be sufficient. Maybe I need to tell IE (or someone else) about these changes in a different way? Ohhhh, I really REALLY need this to function! Thx, /Tommy
-
Brian Delahunty wrote: what exactly are you changing??? Are you just setting the value in teh registry or are you going about it a different way? I'm changing the values (ProxyServer and ProxyEnable) in the registry (HKCU/Soft/MS/Windows/CurrentWindows/Internet Settings). To be sure things are really changed I'm also calling InternetQueryOption and InternetSetOption with values set from the registry. The reg settings are notified to IE through
SendNotifyMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0x1F,
reinterpret_cast(_T("Software\\Microsoft\\Internet Explorer")));But this doesn't seem to be sufficient. Maybe I need to tell IE (or someone else) about these changes in a different way? Ohhhh, I really REALLY need this to function! Thx, /Tommy
The work around would be to make the change and then launch a new browser instance with your current URL and close the existing instance. You might try something like COMspy to see what the IE container is doing when you hit apply. Somehow it must be causing IE to re-init without closing down. BTW its the container that's doing the action and not the IE control which is being hosted. Todd Smith
-
Hello, Not sure if this question belongs here... I have a web server (a service) that acts as a proxy to translate web pages from English to Swedish. In order for this to work, I need to set the appropriate values of proxy server and port and activate "Use a proxy server" in IE->Internet Options->Connections->LAN Settings->Advanced. Now, activating and deactivating frequently will become a pain in the ass jumping to the options dialog all the time, so I figured I could create an IE toolbar button that would do this programmatically. This turned out to be more complicated than I thought... I can change the options programmatically (at IE runtime) but the changes don't seem to be reflected appropriately. I was trying to simulate the [de]activation behaviour of IE when doing it manually, but something seems to be missing. Manually my proxy kicks in just fine, but not programmtically... all options are set and visually it all looks fine. Has somebody dealt with this or does anyone know how to do this? ANy pointers to material on this would be appreciated, TIA, /Tommy
Here's the answer... FINALLY!!! http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/wininet/tutorials/options.asp And now it all works! Thx to all who have helped out! /Tommy