I am going in circles and would appreciate a comment. I am trying to load words from a file into the CsumData word array.
var
i, Errflag : integer;
CsumFrom, CsumTo: LongInt;
Csum: word;
CsumData: packed array[0..42] of word;
...
begin
f_stream := TFileStream.Create('Demo.fil', fmOpenRead);
f_stream.Position:=0;
// Toc checksum
Csum := 0;
Errflag := 0;
CsumFrom := 0;
CsumTo := 14;
CsumData := TFilestream.ReadBuffer(CsumFrom,CsumTo); // *** This Line
CheckSumCalc(Csum, CsumData, Errflag);
...
end