[delphi]
unit Unit2;
interface
uses windows,classes,NMICMP,SysUtils,StdCtrls,messages;
const WM_MY_PING = WM_USER +1024;
type
implementation
{ TMyPingThread }
constructor TMyPingThread.Create(WinHandl : Hwnd;SequenceID : integer;OutPut: OnPinging; EndEvent: ThreadEnd);
procedure TMyPingThread.DoTerminate;
begin
end;
procedure TMyPingThread.HandlingEnd();
begin
end;
procedure TMyPingThread.HandlingPing();
begin
end;
procedure TMyPingThread.Execute;
var
begin
end;
procedure TMyPingThread.OnPing(Sender: TObject; Host: String; Size,
var
begin
end;
end.
2 form 调用Unit1
[delphi]
unit Unit1;
interface
uses
type
var
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
begin
end;
procedure TForm1.HandlingPing(Context:integer;Msg: string);
begin
end;
procedure TForm1.HanglingEnd(Context:integer;Msg: string);
begin
end;
procedure TForm1.OutPut(Context: integer; Msg: string);
begin
end;
procedure TForm1.PingMsgHdl(var Msg:TMessage);
var
begin
end;
end.