Could someone tell me why this doesn't work? I have yet to find a decent Pascal / Delphi Forum....
Code:function MakePacket(ID: string; Data: string):string; var s1:string; i1:integer; begin i1 := length(Data) + 4; // length of packet s1 := StringOfChar(' ',2); //initialize string * 2 CopyMemory(@s1,@i1,2); //convert length to string MakePacket := (ID) + s1 + Data; //make packet. end;





Reply With Quote