function SetIEOfflineMode       (Const isOffline:Boolean):Boolean;         //设定浏览器为离线状态
var
  ConInfo:INTERNET_CONNECTED_INFO;
begin
  if isOffline then
  begin
    ConInfo.dwConnectedState := INTERNET_STATE_DISCONNECTED_BY_USER;
  end
  else
  begin
    ConInfo.dwConnectedState := INTERNET_STATE_CONNECTED;
  end;
  ConInfo.dwFlags := ISO_FORCE_DISCONNECTED;
  Result := InternetSetOption(nil, INTERNET_OPTION_CONNECTED_STATE, @ConInfo, sizeof(ConInfo));
end;

 

posted on 2018-09-05 17:35  EEEEEEEEEEEEEEEEEEE  阅读(150)  评论(0编辑  收藏  举报