本文整理自网络,侵删。
实现对EXE文件的校验字节大小,防止程序被修改或中病毒.
const
//先定义文件的大小
ThisFileSize = 12429824 ;
function CheckThisFileSizeok:boolean;
var vv:ofstruct;
i,len1:integer;
begin
Result :=false;
i:=openfile(pchar(Application.exename),vv,0);
len1:=GetFileSize(i,nil);
_lclose(i);
if len1=ThisFileSize then
Result :=true;
end;
相关阅读 >>
Delphi webbrowser1使用进度条查看浏览器状态
Delphi�⒆执�传入到windows目前窗口cursor所在位置
Delphi �c 如何使用datasnap获取作为标头传递的标记?
Delphi xe6 android 界面皮肤美化 用stylebook
更多相关阅读请进入《Delphi》频道 >>