检测注册表,我的程序在Win98下成功,程序如下:
//拨号网络检测函数
function GetRasStatus: boolean;//return true if RAS connected
var
i: integer;
Reg: TRegistry;
begin
i:=0;
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('/System/CurrentControlSet/Services/RemoteAccess', False);
if Reg.ValueExists('Remote Connection') then Reg.ReadBinaryData('Remote Connection',i,4);
finally
Reg.Free;
end;
Result:=(i<>0);
end;