Прочитал, конечно же....
Перепробывал все варианты.
Но все равно выдет ошибку.
Хоть и сделал все как было написано...
Може хоть кто нибуть подскажет где ошибка?
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdRawBase, IdRawClient,
IdIcmpClient, StdCtrls, jpeg, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
IdIcmpClient1: TIdIcmpClient;
Image1: TImage;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
i : integer;
a: array [1..32] of string;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
a[1]:= '10.105.127.69';
IdIcmpClient1 := TIdIcmpClient.Create(nil);
IdIcmpClient1.Host := (a[1]);
IdIcmpClient1.TTL := 128;
IdIcmpClient1.ReceiveTimeout := 3000;
try
IdIcmpClient1.Ping;
except
end;
If IdIcmpClient1.ReplyStatus.FromIpAddress <> IdIcmpClient1.Host Then
Begin
IdIcmpClient1.Free;
Close;
Exit;
End;
If IdIcmpClient1.ReplyStatus.FromIpAddress = IdIcmpClient1.Host Then
Begin
IdIcmpClient1.Free;
Image1.Show;
end;
end;
end.
Админ: Пользуемся тегами для оформления кода!