[Lazarus] TFileStream

Vincent Snijders vincent.snijders at gmail.com
Mon Jan 26 19:10:04 CET 2009


2009/1/26, Mattias Gaertner <nc-gaertnma at netcologne.de>:
> On Mon, 26 Jan 2009 15:49:24 +0200
>
> Dave Coventry <dgcoventry at gmail.com> wrote:
>
>
> > I'm having some difficulty over this:
>  >
>  > ============= snip ===================
>  >   FS:=TFileStream.Create(fname, fmshareDenyWrite);
>  >   Try
>  >     FS.ReadBuffer(hdbuffer[0],32);
>  >   Finally
>  >     FreeAndNil(FS);
>  >   end;
>  >   RecSize:=LEtoN(PSmallInt(@hdbuffer[10])^);
>  >   SetLength(recbuffer,RecSize);
>  >   FillChar(recbuffer,RecSize,' ');
>
>
> Maybe you mean
>
> FillChar(recbuffer^,RecSize,' ');
>  ?
>

Or FillChar(recbuffer[1],RecSize,' ');

if it is a string or [0] if it is a dynarray.

Vincent



More information about the Lazarus mailing list