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



Skybuck Flying wrote:

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.


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!


--
"I'd rather have a bottle in front of me than a frontal lobotomy"

"Daily Thought:

SOME PEOPLE ARE LIKE SLINKIES. NOT REALLY GOOD FOR ANYTHING BUT
THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS.
http://webpages.charter.net/jamie_5";

.


Quantcast