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 


c++ WriteProcessMemory

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kid9987
How do I cheat?
Reputation: 0

Joined: 12 Jan 2012
Posts: 8

PostPosted: Wed Feb 22, 2012 4:50 pm    Post subject: c++ WriteProcessMemory Reply with quote

I'm making a trainer and its an executable, but I cant figure out how to use writeprocessmemory correctly in C++. If anyone could please give me an example I'd be grateful. Also, in-case I explained it badly I want to hook my executable to a running process to write memory to, as a CE trainer does essentially. I've been writing memory in my trainers using this to call the modifications :

Code:

BYTE EnableTestBytes[9]      = "\x00\x00\x00\x00\x00\x00\x00\x00";
BYTE DisableTestBytes[9]      = "\x00\x00\x00\x00\x00\x00\x00\x00";
DWORD TestHackAddy = 0x00000000;


though seeing as to my project is now an executable I need some way to read memory on the games client to do so.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Wed Feb 22, 2012 8:20 pm    Post subject: Reply with quote

With what you supplied:

Enable:
Code:
WriteProcessMemory( hProcessHandle, (LPVOID)TestHackAddy, &EnableTestBytes, 9, NULL );


Disable:
Code:
WriteProcessMemory( hProcessHandle, (LPVOID)TestHackAddy, &DisableTestBytes, 9, NULL );

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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