Re: Can't understand why these exceptions occur...



Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx> wrote in
news:Fng0k.34$sf2.0@xxxxxxxxxxxx:

<snip>
Only thing that looks suspicious to me is the record.

Maybe you should try making it a packed record to prevent any gaps or
so...

I didn't know what packed was - I've looked it up. Even though this is
something very useful which I intend to use more often (thanks), I doubt
this is the cause of my problems.

In fact, I've just verified it, and it didn't make a difference...

type
TBufferInfo = packed Record // *new*
name : String[255];
size : Int64;
End;

I don't use "file of"... I use TFileStream ;)

Thanks.

<snip (reply by Jamie)
and if you were really looking at it close enough you would
of seen that he wasn't creating a file to start with if one
did not exist!

As I've already replied to your other post, it's not meant to create a
file. LoadBuffer loads the file only if it exists, SaveBuffer always saves
the file.

I still don't understand why I get this exception...

Thanks,

Ikke
.


Quantcast