IdIcmpClient1.ReceiveTimeout := StrToInt(floattoStr(JvSpinEdit1.Value));
//Festlegen des Ping-Timeoutes (bei mir 50 ms)
x1 := True;
repeat
x1 := FALSE;
if (JvIPAddress1.AddressValues.Value1 < JvIPAddress2.AddressValues.Value1)
then //---Überprüft ob Start-IP kleiner als Ziel-IP (x1 = True)
begin
x1 := True;
end
else if (JvIPAddress1.AddressValues.Value1 = JvIPAddress2.AddressValues.Value1)
and
(JvIPAddress1.AddressValues.Value2 < JvIPAddress2.AddressValues.Value2)
then
begin
x1 := True;
end
else if (JvIPAddress1.AddressValues.Value1 = JvIPAddress2.AddressValues.Value1)
and
(JvIPAddress1.AddressValues.Value2 = JvIPAddress2.AddressValues.Value2)
and
(JvIPAddress1.AddressValues.Value3 < JvIPAddress2.AddressValues.Value3)
then
begin
x1 := True;
end
else if (JvIPAddress1.AddressValues.Value1 = JvIPAddress2.AddressValues.Value1)
and
(JvIPAddress1.AddressValues.Value2 = JvIPAddress2.AddressValues.Value2)
and
(JvIPAddress1.AddressValues.Value3 = JvIPAddress2.AddressValues.Value3)
and
(JvIPAddress1.AddressValues.Value4 < JvIPAddress2.AddressValues.Value4)
then
begin
x1 := True;
end;
if not x1
then exit;
//Wenn IP-Adresse ungültig, ENDE
//IP-Zuweisung:
IdIcmpClient1.Host := JvIPAddress1.text;
Application.ProcessMessages;
//Anpingen
IdIcmpClient1.Ping();
//========= HIER FEHLER ===============
Application.ProcessMessages;
HochzählenIP;
//Hier wird die IP um 1 erhöht, externe Funktion
//Gib System Zeit
Application.ProcessMessages;
until (JvIPAddress1.text = JvIPAddress2.text)
//Solange ausführen bis Start-IP und Ziel-IP gleich sind