Simon GL

Simon GL

  • NA
  • 3
  • 0

Web Browser Control - using InternetOpen session

Aug 9 2007 9:27 AM

Hello,

I would appreciate it if anyone could help me with this. I'm pretty new to C#.

I'm trying to get a Web Browser Control to use the same internet session as an InternetOpen call that I've made.

The reason for this is that I want the browser session to bypass a proxy server. I have a 'handle' to a successful internet connection using InternetOpen (see below) and I want the Web Browser Control to use this for the session, but the control defaults to using the local proxy settings.

public bool Open()

{hInternet = InternetOpen("Test", INTERNET_OPEN_TYPE_DIRECT, string.Empty, string.Empty, 0);

if (hInternet == IntPtr.Zero)

return false;

else

return true;

}

Incidentally InternetSetOption worked a little (and the browser control seemed to be affected by it) but it was no use because you have to list all the websites that are to bypass the proxy.

Thanks,

Simon.


Answers (1)