Worst thing to do is trying to read the whole file into memory at a time, because the file could be huge. Read e.g. 65536 bytes at a time into a buffer, process those bytes, then continue reading in 64k blocks until EoF is reached. I think you're already nearing the limits of VB as a language itself, may be time to move on to C/C++. Type MDxSum dwSum(3) As Long End Type...and shouldn't that be 4, not 3? Also, how the program crashes is important also in figuring out the error. (Invalid Page Fault, Access Violation, Illegal Instruction, etc.)