分享

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

 aaie_ 2012-10-20
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.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多