下面函数测试是否连接上internet
Function HasInternetconnect:boolean;
var REG:TRegistry;
dat:array[0..3] of char;
下面代码检查是否连通Internet,from cakk
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_LOCAL_MACHINE;
reg.OpenKey('System/CurrentControlSet/Services/RemoteAccess',false);
reg.ReadBinaryData('Remote Connection',dat,4);
reg.free;
result:=(dat[0]=#1);
end;