1、检测主程序大小,防止破解补丁之类:
Function TForm1.GesSelfSf: integer;
var
F: file of byte;
begin
Filemode:=0;
Assignfile(F,'.FileName.exe');
Reset(f);
Result:=Filesize(F);
Closefile(F);
end;
2、检测创建日期和时间,让破解补丁实效:
Function TForm1.FinDate:String;
var
t:TDate;
begin
ShortDateFormat:='yyyy-mm-dd';
t:=FileDateToDateTime(FileAge('FileName.exe'));
Result:=DateToStr(t);
end;