RE: VB networking app

From: Rhett Gong [MSFT] (v-raygon_at_online.microsoft.com)
Date: 03/01/04


Date: Mon, 01 Mar 2004 09:15:30 GMT

Hi Mike,
>From your description, you would like to know if there is a way to apply proxy setting once they are retrieved. Have I understood correctly? Please feel free
to let me know if there is anything misunderstanding.

WinHTTP proxy settings are different registry keys than IE/WinInet. WinInet API can be used to pick up IE proxy settings. Moreover WinInet API can be used
to set/retrieve proxy settings for any HINTERNET handle. If this HINTERNET handle is NULL, then the proxy settings used by IE are retrieved or modified.
 
Please refer the following MSDN article which describes this.
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/setting_and_retrieving_internet_options.asp>
 
Quoting from this article, “In addition to the various HINTERNET handles, an application can also use NULL to set or retrieve the default values of the Internet
options used by Internet Explorer and the Win32 Internet functions. Setting Internet options when using NULL as the handle will change the default values of
the options, which is currently stored in the registry.”
 
The APIs used for these set and retrieve are InternetSetOption and InternetQueryOption which are explained in
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internetsetoption.asp> and
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internetqueryoption.asp>.
 
A list and description of the flags is available at
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/option_flags.asp>.

For how to enable Internet Functionality:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/enabling_internet_functionality.asp>

Best regards,
Rhett Gong [MSFT]
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.



Relevant Pages

  • Re: VB networking app
    ... WinInet API can be used to pick up IE proxy settings. ... > to set/retrieve proxy settings for any HINTERNET handle. ... an application can also use NULL to set or retrieve the default values of ... > options used by Internet Explorer and the Win32 Internet functions. ...
    (microsoft.public.win32.programmer.networks)
  • Re: DNS Server without connectivity
    ... brought the internet connection into a new ... switch fresh out of the box, connected only the server to it, made sure there ... are no proxy settings on he browser and disabled the windows firewall. ...
    (microsoft.public.windows.server.dns)
  • Re: Internet Connection Error
    ... Try comparing the proxy settings for Firefox compared to Internet Explorer ...
    (microsoft.public.windowsxp.security_admin)
  • http proxy settings per machine not user
    ... We need some PCs to have internet access, and any user who logs on to that ... machine should get the http proxy settings, and therefore have internet ... we entered the http proxy settings on a per-user basis on ...
    (microsoft.public.win2000.group_policy)
  • Re: Unable to block internet access through GPO by using a proxy
    ... So they need to access certain sites on the internet and the lntranet site ... What is the proxy settings that you configured on the user ... create a GPO user configuration software restriction policy to prevent ... Microsoft Windows Operating System Group Policy Result tool v2.0 ...
    (microsoft.public.windows.server.active_directory)