by El Mariachi (5 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
Gets the correct value for file sizes when the file is large (> ~2.1GB). Basically the file size function included in VB will give a wrong value when used on large files. The traditional way of getting the file size via API will also not work as detailed in the MS article https://support.microsoft.com/default.aspx?scid=kb;en-us;185476. After a bit of research I ended up tweaking the API function to calculate the proper file size. To see the differences, browse to a large file. Let me know if there are any bugs or suggestions to improve performance.
API DeclarationsSeveral are listed in the code.