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



Seems to run fine here (Delphi 2007, XP x64)

Modifications made to run it:

begin
// if ParamCount = 2 then
begin
LoadCache('FileLocatorBuffer.dat');

// if LowerCase(ParamStr(1)) = 'buffer' then
begin
StartBufferingFiles('bla' {ParamStr(2)});
end;

SaveCache('FileLocatorBuffer.dat');
end;
end.

Test folder:

j:\test blabla\Project1.exe

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...

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

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

Bye,
Skybuck.


.


Quantcast