Open the project "C:\Delphi\Zip\Demo1\ZipDemo1.dpr" and try to compile
it. When I did it, I got the following error:
[Fatal Error] mainunit.pas(632): Internal error: C3517
This is a compiler error and I'm reporting it to Borland. I isolated the
problem and it apparently occurs when optimizations are on (the default)
and you explicitly cast an Int64 object property (not a constant or
variable) to Int64. It might not occur in your version/build of Delphi,
but if it does, there would be two solutions.
1) Turn off optimizations around the ZipMaster1Progress procedure:
{$OPTIMIZATION OFF}
procedure TMainform.ZipMaster1Progress(Sender: TObject...
...
end;
{$OPTIMIZATION ON}
2) Or (better) remove the unnecessary Int64 castings:
// Step := Integer(Int64(TotalProgress1) * Int64(10000)
// div Int64(TotalSize1));
Step := Integer(TotalProgress1 * 10000 div TotalSize1);
// Step := Integer(Int64(TotalProgress2) * Int64(10000)
// div Int64(TotalSize2));
Step := Integer(TotalProgress2 * 10000 div TotalSize2); |