Thema: Delphi Untyped Binary Files

Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#8

Re: Untyped Binary Files

  Alt 19. Feb 2006, 18:52
One more thing to mention is, you assign a block size when opening the file. You should make a decision:

Delphi-Quellcode:
// either
Reset(Mfile, 1);
BlockRead(Mfile, tmp, SizeOf(Integer));

// or
Reset(Mfile, SizeOf(Integer));
BlockRead(Mfile, tmp, 1);
In your case memory can get overwritten during a call to BlockRead(), even though my test didn't crash.

marabu
  Mit Zitat antworten Zitat