unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdUDPBase, IdUDPServer, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
IdUDPServer1: TIdUDPServer;
procedure Button1Click(Sender: TObject);
procedure IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle); private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
IdUDPServer1.Send('127.0.0.1',2000,'lskjdf');
end;procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
begin
showmessage('received');
end;end.错误: [Error] Unit1.pas(15): Undeclared identifier: 'TIdSocketHandle'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'请问是怎么回事?难道是因为盗版的delphi7的原因吗?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdUDPBase, IdUDPServer, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
IdUDPServer1: TIdUDPServer;
procedure Button1Click(Sender: TObject);
procedure IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle); private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
IdUDPServer1.Send('127.0.0.1',2000,'lskjdf');
end;procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
begin
showmessage('received');
end;end.错误: [Error] Unit1.pas(15): Undeclared identifier: 'TIdSocketHandle'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'请问是怎么回事?难道是因为盗版的delphi7的原因吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货