2009. január 12., hétfő

How to force IExplorer to re-read registry settings


Problem/Question/Abstract:

I've written a small app that modifies a setting for IE and need to somehow tell IE to re-read the registry settings. Does anyone know of an API call or message that will do this?

Answer:

This will do the trick:

{ ... }
var
  HInet: HINTERNET;
  { ... }
  HInet := InternetOpen(PChar('SomeAppName'), INTERNET_OPEN_TYPE_DIRECT,
    nil, nil, INTERNET_FLAG_OFFLINE);
try
  if HInet <> nil then
    InternetSetOption(HInet, INTERNET_OPTION_SETTINGS_CHANGED, nil, 0);
finally
  InternetCloseHandle(HInet);
end;

Nincsenek megjegyzések:

Megjegyzés küldése