Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


About Read & Write ProcessMemory of problem!!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source -> Plugin development
View previous topic :: View next topic  
Author Message
hairi
Newbie cheater
Reputation: 0

Joined: 07 May 2007
Posts: 15

PostPosted: Sat Aug 18, 2007 4:49 am    Post subject: About Read & Write ProcessMemory of problem!! Reply with quote

who can give me some code about Read & Write ProcessMemory of target process by Delphi?

For example:
Open Game Process of Delphi
Code:

procedure TXPower.Timer6Timer(Sender: TObject);
var
  DLLSub: function ():Boolean;stdcall;
  hw: HWND;
  pid: dword;
  h: THandle;
begin
h := OpenProcess(PROCESS_ALL_ACCESS, false, GetProcessID('Game.exe'));
if h = 0 then Exit;
DLLHandle := LoadLibrary('injectGame.dll');
@InstallHook := GetProcAddress(DLLHandle, 'InstallHook');
@UnHook := GetProcAddress(DLLHandle, 'UnHook');
@DLLSub := GetProcAddress(DLLHandle, 'ShowForm');
DLLSub();
timer6.Enabled:=false;
end;



WriteProcessMemory of Delphi
Code:

procedure Write_PGongJi(JBaseAddr:integer;ProgramPath:string);
var
  Buf:byte;
  lpNumberOfBytes: LongWord;
  BaseAddr:integer;
begin
  BaseAddr:=JBaseAddr+361;
  Buf:=1;
  WriteProcessMemory(GetCurrentProcess,Pointer(BaseAddr),@Buf,1,lpNumberOfBytes);
 
end;



ReadProcessMemory of Delphi
Code:

procedure Timer_BaseAddr;stdcall;
begin
  vBaseAddr:=$02AA3020;
  tBaseAddr:=0;
  ReadProcessMemory(GetCurrentProcess,Pointer(vBaseAddr),@vBuf,4,vlpNumberOfBytes);
  tBaseAddr:=tBaseAddr+(vBuf[3]*256*256*256);
  tBaseAddr:=tBaseAddr+(vBuf[2]*256*256);
  tBaseAddr:=tBaseAddr+(vBuf[1]*256);
  tBaseAddr:=tBaseAddr+vBuf[0];
  ZBaseAddr:=tBaseAddr;
  vBaseAddr:=$02C43148;
  tBaseAddr:=0;
  ReadProcessMemory(GetCurrentProcess,Pointer(vBaseAddr),@vBuf,4,vlpNumberOfBytes);
  tBaseAddr:=tBaseAddr+(vBuf[3]*256*256*256);
  tBaseAddr:=tBaseAddr+(vBuf[2]*256*256);
  tBaseAddr:=tBaseAddr+(vBuf[1]*256);
  tBaseAddr:=tBaseAddr+vBuf[0];
  JBaseAddr:=tBaseAddr;     
end;



so who can give me analogous code by plugins of CE.thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source -> Plugin development All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites