settingsunit.pas.svn-base

来自「这是一段游戏修改工具的源代码.ring3功能由dephi开发,驱动是C开发.希望」· SVN-BASE 代码 · 共 49 行

SVN-BASE
49
字号
unit settingsunit;

interface

uses forms,classes, SysUtils,dialogs;


var trainerfile: TFileStream;
protect:boolean;

function openself: boolean;

implementation

function openself: boolean;
var temp: integer;
begin
  //use c:\bla.exe till the final build (just to simplify debugging)
  try
    {$ifdef trainerbeta}
      trainerfile:=TFileStream.create('c:\xxx.exe',fmOpenRead or fmShareDenyNone);
    {$else}
      trainerfile:=TFileStream.create(application.exename,fmOpenRead or fmShareDenyNone);
    {$endif}
    //find out of this is a patcher or a memorybrowser
    trainerfile.Position:=80;

    trainerfile.Readbuffer(temp,4);
    trainerfile.position:=temp;

    trainerfile.ReadBuffer(temp,4);

    protect:=temp=$22322;

    if temp=$111111 then
      result:=true
    else
      result:=false;
      
  except
    result:=false;
    messagedlg('There was an error while trying to read the trainer. Or the file got changed(like a exe-compresser), or you''re using an old unpatched version of win 95 or earlier',mterror,[mbok],0);
    application.Terminate;
  end;

end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?