DwinsHs_SetProxy procedure

Sets a proxy server to use. By default, the proxy or direct configuration from the registry (the user Inetnet settings in control panel) will be used.

If you don't use the pre-defined downloading wizard page, please call the procedure in the InitializeWizard event function.

If you use the pre-defined downloading wizard page, please call the procedure after calling DwinsHs_InitializeWizard procedure in the InitializeWizard event function. Or call it in the BeforeDownload callback function specified by the BeforeDownload parameter of the DwinsHs_CurPageChanged procedure.

Declaration:

type
  TProxyMode = (pmDefault, pmDirect, pmProxy);
  TProxyProtocol = (ppHttp, ppSocks);
procedure DwinsHs_SetProxy(Mode: TProxyMode; Protocol: TProxyProtocol; Host: AnsiString;
  Port: Integer; Username, Password: AnsiString);

Parameters:

Example:

procedure InitializeWizard();
begin
  ...
  DwinsHs_InitializeWizard(wpPreparing);
  DwinsHs_SetProxy(pmProxy, ppHttp, 'www.example_proxy.com', 8080, '', '');
  ...
end;