Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proxy settings cleared by Internet Explorer

Status
Not open for further replies.

penkehenke

Programmer
Jun 21, 2004
15
SE
Hi!

O.S: Windows XP professional SP2
Develop. tool: V.S. 8
I.E: 6.0

I'm programming an application in V.S. 8 where I need to set the Internet Explorer proxy server settings.
I've done it the way everybode seems to do it but I.E don't respond to my changes, instead it clears my values in the registry. Anyone who has experienced this before and know why?

The code I'm using is the following:
(I do have values in my code, just removed them for this show case)

list.pOptions[0].dwOption = INTERNET_PER_CONN_FLAGS;
list.pOptions[0].Value.dwValue = dwFlags;

list.pOptions[1].dwOption = INTERNET_PER_CONN_PROXY_SERVER;
list.pOptions[1].Value.pszValue = "";

list.pOptions[2].dwOption = INTERNET_PER_CONN_PROXY_BYPASS;
list.pOptions[2].Value.pszValue = "";

list.pOptions[3].dwOption =INTERNET_PER_CONN_AUTOCONFIG_URL;
list.pOptions[3].Value.pszValue = "";

InternetSetOption( NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, dwBufSize);

delete [] list.pOptions;
InternetSetOption(NULL, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
InternetSetOption(NULL, INTERNET_OPTION_REFRESH , NULL, 0);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top