//
使用代理服务器
procedure SetProxy( const ProxyHostAndPort: String);
var
info: TInternetProxyInfo;
begin
info.dwAccessType : = INTERNET_OPEN_TYPE_PROXY;
info.lpszProxy : = PChar(ProxyHostAndPort);
info.lpszProxyBypass: = nil ;
UrlMkSetSessionOption(INTERNET_OPTION_PROXY,@info,sizeof(info), 0 );
end ;
// 不使用代理服务器
procedure SetDirectConnection;
var
info: TInternetProxyInfo;
begin
info.dwAccessType : = INTERNET_OPEN_TYPE_DIRECT;
info.lpszProxy : = nil ;
info.lpszProxyBypass: = nil ;
UrlMkSetSessionOption(INTERNET_OPTION_PROXY,@info,sizeof(info), 0 );
end ;
procedure SetProxy( const ProxyHostAndPort: String);
var
info: TInternetProxyInfo;
begin
info.dwAccessType : = INTERNET_OPEN_TYPE_PROXY;
info.lpszProxy : = PChar(ProxyHostAndPort);
info.lpszProxyBypass: = nil ;
UrlMkSetSessionOption(INTERNET_OPTION_PROXY,@info,sizeof(info), 0 );
end ;
// 不使用代理服务器
procedure SetDirectConnection;
var
info: TInternetProxyInfo;
begin
info.dwAccessType : = INTERNET_OPEN_TYPE_DIRECT;
info.lpszProxy : = nil ;
info.lpszProxyBypass: = nil ;
UrlMkSetSessionOption(INTERNET_OPTION_PROXY,@info,sizeof(info), 0 );
end ;