Recent

Author Topic: BlockWrite, Array size  (Read 7168 times)

mrdebug

  • Full Member
  • ***
  • Posts: 158
BlockWrite, Array size
« on: April 10, 2008, 11:09:45 am »
BlockWrite not work with very large arrays. How can I do to save my array?

Code: [Select]

      SetLength(AAFileOut, 1024 * 512);
      AssignFile(FileOut, TSDDDirectory.FileName+ '\SisOnLine.lic');
      try
        ReWrite(FileOut, 1);
        BlockWrite(FileOut, AAFileOut, Length(AAFileOut));
      finally
        CloseFile(FileOut);
      end;

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: BlockWrite, Array size
« Reply #1 on: April 10, 2008, 03:25:11 pm »
I think there is a bug in your code. It should be:
Code: [Select]

  BlockWrite(FileOut, AAFileOut[0], Length(AAFileOut));

mrdebug

  • Full Member
  • ***
  • Posts: 158
BlockWrite, Array size
« Reply #2 on: April 10, 2008, 03:38:57 pm »
Thank you very mutch!

 

TinyPortal © 2005-2018