PDA

View Full Version : Patch for BDE 'Insufficient disk space' problem. (4Gb multiples



m-khorsandi
دوشنبه 03 مرداد 1384, 16:00 عصر
This unit is a patch for the famous 4Gb BDE Bug. It is build to fix the 'Insufficient disk space'-error which can occur while using BDE when the disk free space is near to a multiple of 4Gb. For more information please see BDE report# 7089 on Quality Central.
The reason for the error in BDE is aparently a bug in idapi32.dll while computing free disk space. Idapi32.dll is using the api function called GetDiskFreeSpaceA exported by kernel32.dll.
The solution is to 'patch' GetDiskFreeSpaceA in kernel32.dll for the current process, every call to this function is redirected to a new routine (NewGetDiskFreeSpaceA).

The source code of the patch is included. If you use another programming language (i.e. not Delphi), a precompiled DLL (FIX4GBug.dll) is also included. (If you can compile the included unit, then you do not need to distribute the DLL)