PRB: Programmatic Proxy Setting Changes Don't Take Effect (294989)



The information in this article applies to:

  • Microsoft Windows CE for the Pocket PC

This article was previously published under Q294989

SYMPTOMS

When an application modifies the registry to modify internet proxy server settings, the changes don't take effect in the application.

CAUSE

The WININET module holds memory resident copies of the registry settings and must be notified if these settings change.

RESOLUTION

After changing the registry, call InternetSetOption with the INTERNET_OPTION_SETTINGS_CHANGED parameter:
InternetSetOption(NULL,INTERNET_OPTION_SETTINGS_CHANGED,NULL,0);
				

STATUS

This behavior is by design.

MORE INFORMATION

The proxy server settings are located under HKEY_CURRENT_USER in the key defined by REGSTR_PATH_INTERNETSETTINGS in inetreg.h. The value names are defined by REGSTR_VAL_PROXYENABLE, REGSTR_VAL_PROXYSERVER, and REGSTR_VAL_PROXYOVERRIDE.

The developer should also consider notifying other interested applications that a system-wide setting has changed. This can be done by broadcasting the WM_SETTINGCHANGE message:
SendNotifyMessage(HWND_BROADCAST,WM_SETTINGCHANGE,(WPARAM)(0),(LPARAM)(0));
				

Modification Type:MinorLast Reviewed:7/27/2004
Keywords:kbpending kbprb KB294989