function TfDoc.ReadStringFromStream(F: TStream):
string;
var
aStrLen: Integer;
begin
F.ReadBuffer(aStrLen, SizeOf(Integer));
SetLength(Result, aStrLen);
//<<< Da kommt ein Fehler
if aStrLen > 0
then
F.ReadBuffer(Pointer(Result)^, aStrLen);
end;
{Procedure blablabla}
ReadStringFromStream(aStream);
FName := ReadStringFromStream(aStream);
if FName <> ExtractFileName(FileName)
then
begin
MessageBox(
Handle,
'
Der Dateiname wurde seit dem letzten Speichern verändert.',
'
Hinweis', MB_OK);
Modified := true;
IsMod := true;
end
else
IsMod := false;
FAuthor := ReadStringFromStream(aStream);
FDate := ReadStringFromStream(aStream);
FComment := ReadStringFromStream(aStream);
Temp := ReadStringFromStream(aStream);
aSStream := TStringStream.Create(Temp);
case FEditor
of
etRichText: RichEdit.Lines.LoadFromStream(aSStream);
etCode: Code.Lines.LoadFromStream(aSStream);
end;
FIsDC := true;