Autor Beitrag
ralfi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mo 30.05.05 11:16 
Hallo!

Ich habe vorher Delphi 7 benutzt. So habe ich normalerweise UDP-Packete (IdUDPServer, Indy 9) empfangen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TfrmMain.IdUDPServer1UDPRead(Sender: TObject; AData: TBytes; 
  ABinding: TIdSocketHandle); 
var 
sText: string
begin 
AData.Position := 0
SetLength(sText, AData.Size); 
AData.ReadBuffer(sText[1], AData.Size); 
Memo1.Lines.Add(sText) 
end;


Wenn ich diese Kode in Delphi 2005 (Indy 10) ausführen möchte, kommt die Meldung: [Fehler] Unit1.pas(59): E2003 Undefinierter Bezeichner: 'TBytes'. Die Deklaration

type TBytes = array of Byte

hat auch nichts gebracht. Den Datentyp wird zwar erkannt, aber es scheitert wieder an

ausblenden Delphi-Quelltext
1:
ADate.Position := 0					


[Fehler] Unit1.pas(881): E2018 Record, Objekt oder Klassentyp erforderlich.

Was soll das alles? Was mache ich jetzt?
Force
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 143

Ubuntu Jaunty
FreePascal
BeitragVerfasst: Mi 13.09.06 16:35 
Folgende Units müssen in Uses:

IdBaseComponent, IdComponent, IdUDPBase, IdUDPServer,idSocketHandle,idStack, idGlobal




/edit: Sorry, hab jetzt erst gesehen, dass das von 2005 ist :D :D