[BUG报告]CnMD5有BUG
CnMD5中计算大文件(我测试的是2G的)MD5的代码有BUG,运行代码至
------------------------------------------------------------------------------------------------------------------------
MD5Init(Context);
FileHandle := CreateFile(pChar(FileName), GENERIC_READ, FILE_SHARE_READ or
FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL or
FILE_FLAG_SEQUENTIAL_SCAN, 0);
if FileHandle <> INVALID_HANDLE_VALUE then
try
MapHandle := CreateFileMapping(FileHandle, nil, PAGE_READONLY, 0, 0, nil);
if MapHandle <> 0 then
try
ViewPointer := MapViewOfFile(MapHandle, FILE_MAP_READ, 0, 0, 0);
--------------------------------------------------------------------------------------------------------------------------
此处MapViewOfFile失败,返回为Nil.
我用的是最新版的,小文件测没有问题,请版主检查.
|