Thema: Delphi Untyped Binary Files

Einzelnen Beitrag anzeigen

Waldteufel
(Gast)

n/a Beiträge
 
#5

Re: Untyped Binary Files

  Alt 19. Feb 2006, 18:07
Hi Silvia.

MKinzler already posted the solution.
You have to place an @-sign before tmp when passing it to BlockWrite and / or BlockRead, because they expect their second parameter being a pointer to a memory location where to put the value read from the file.

This should work:
Code:
BlockWrite(MFile, [color=#ff0000][b]@[/b][/color]tmp, SizeOf(integer));


//edit: Whoops. I was wrong. It is no pointer.
  Mit Zitat antworten Zitat