Brauche eure Hilfe (siehe oben)
Delphi-Quellcode:
type
TData = record
ToDo:integer;
Nr:longint;
Name:string[255];
Telefonnummer:string[255];
end;
function RecordToStream(var input: TData): TStream;
var s:string;
begin
SetLength(s,SizeOf(input));
Move(input, s[1], SizeOf(input));
Result:=TMemoryStream.Create;
Result.Size:=0;
Result.Position:=0;
Result.WriteBuffer(s,Length(s));
end;
function StreamToRecord(const input: TStream): TData;
var s:string;
begin
input.Position:=0;
SetLength(s,input.Size);
input.ReadBuffer(s[1],input.Size);
Move(s[1], Result, SizeOf(TData));
end;
Vielen Dank!