Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Activating IE proxy settings...?

Activating IE proxy settings...?

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadmintutorial
5 Posts 3 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tommy Svensson
    wrote on last edited by
    #1

    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

    B T 2 Replies Last reply
    0
    • T Tommy Svensson

      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

      B Offline
      B Offline
      Brian Delahunty
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • B Brian Delahunty

        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

        T Offline
        T Offline
        Tommy Svensson
        wrote on last edited by
        #3

        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

        T 1 Reply Last reply
        0
        • T Tommy Svensson

          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

          T Offline
          T Offline
          Todd Smith
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • T Tommy Svensson

            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

            T Offline
            T Offline
            Tommy Svensson
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups