//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
FStopScanFlag=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString IIp;
AnsiString LocalIP=IdIPWatch1->LocalIP();
int IIndex=LocalIP.LastDelimiter(".");
LocalIP=LocalIP.SubString(1,IIndex);
for(int i=0;i<254;i++)
{
IIp=LocalIP+IntToStr(i+1);
IdIcmpClient1->Host=IIp;
IdIcmpClient1->Ping();
Application->ProcessMessages();
if(FStopScanFlag==true)
{
break;
}
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::IdIcmpClient1Reply(TComponent *ASender,
const TReplyStatus &AReplyStatus)
{
if(AReplyStatus.ReplyStatusType==rsEcho)
Memo1->Lines->Add(AReplyStatus.FromIpAddress);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
FStopScanFlag=true;
}
//---------------------------------------------------------------------------
hnzlk
- 粉丝: 44
- 资源: 11
最新资源
- Annotations_Train_abstract_v002.zip
- ap5030dn-openwrt-ath79-generic-huawei-ap5030dn-initramfs-kernel
- 华为AP无线接入控制器学习资料
- 金铲铲S13双城之战自动拿牌助手2.0
- Sigrity Power SI 仿真分析教程与实例分析.rar
- 基于Vue和JavaScript的掌上生活超市小程序配送解决方案设计源码
- 基于Java和安卓基础知识的简易记事本设计源码
- 基于SaToken轻量级Java权限认证的XrSaTokenVue Vue设计源码
- 基于Java语言的RxTool设计源码集合
- PHP性能检测扩展XHProf与FirePHP线上调试工具详解
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论3