delphi用MapFileAndCheckSum 函数检测 exe 或 dll 是否被修改


本文整理自网络,侵删。

 unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

uses ImageHlp; {MapFileAndCheckSum 定义在这个单元}

procedure TForm1.Button1Click(Sender: TObject);
const
exeFile = 'c:\windows\system32\notepad.exe'; {exe or dll}
var
size1,size2: Cardinal;
begin
MapFileAndCheckSum(exeFile, size1, size2);
ShowMessageFmt('原生大小: %d; 修改后大小: %d', [size1,size2]);
{函数返回 0 表示已顺利检测, 但还要判断 size1、size2 是否相等}
end;

end.

相关阅读 >>

Delphi xe(indy10)tidbytes转ansistring的实现

Delphi opendialog1 打开多个文件

Delphi 使用twebbrowser组件保存网页为html和mht文件

Delphi winapi: getparent - 判断两个窗口是不是父子关系

Delphi 判断正在运行的设备是iphone还是ipad

Delphi 网络时间校对

Delphi 正则表达式校验手机号

Delphi判断字符是否是汉字

Delphi的stringreplace 字符串替换函数

Delphi中dbgrid控件数据库点击某列按序排列

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...