免费才是王道.rar[点击下载](179 K) 下载次数:124 累计下载获得 DB 43 刀 源码由 h4c0r-BG 发布,内容如下:
var
WindowName: Integer;
ProcessId: Integer;
ThreadId: Integer;
buf: PChar;
HandleWindow: Integer;
Write: Cardinal;
{....}
const
WindowTitle = 'Counter-Strike';
Address = $1000B512;
PokeValue = $EB;
NumberOfBytes = 1;
{....}
procedure TForm1.Button1Click(Sender: TObject);
begin
WindowName := FindWindow(nil, WindowTitle);
if WindowName = 0 then
begin
MessageDlg('Program not running.', mtWarning, [mbOK], 0);
end;
ThreadId := GetWindowThreadProcessId(WindowName, @ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId);
GetMem(buf, 1);
buf^ := Chr(PokeValue);
WriteProcessMemory(HandleWindow, ptr(Address), buf, NumberOfBytes, Write);
FreeMem(buf);
CloseHandle(HandleWindow);
end;