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 


Reading value from address

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

Joined: 17 Dec 2013
Posts: 1

PostPosted: Tue Dec 17, 2013 3:32 pm    Post subject: Reading value from address Reply with quote

I've found this using google, and it works great.

Code:

void ReadProcessBYTES(DWORD lpAddress, void* buf, int len)
{
  DWORD oldprot, dummy = 0;
  HWND hwnd = FindWindow(NULL,_T("KalOnline"));

  if (hwnd)
  {
     DWORD proc_id;
     GetWindowThreadProcessId(hwnd, &proc_id);
     HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id);

     ReadProcessMemory(hProcess, (void *) lpAddress, buf, len, 0);
    CloseHandle(hProcess);
  }
}


Code:

ReadProcessBYTES(0x028F490,&Y,sizeof(DWORD));


But this address changes on restarting the process.

Using cheat engine I found
Address: 0x06f3840
offset: 463c

which was exactly what I was looking for, and always works in cheat engine.

Now here is my main problem, I have no clue how to include the offset into the method so that I can read the correct value.

I've been searching around on this forum, but I couldn't understand how the tutorials explained how to really do it.

I need to see a real C++ method showing how it is done, because I get nothing but confused when you tell me to: "first do this, then this, and now do that.".

If someone could show me a code example of how this can be done, It would be so much easier for me to understand.
I know it might sound weird that I would understand a code example rather than instructions of how to do it, but I've always went off better by figuring it out how it works on my own, if I just have an example to play with.

Thanks in advance.
Back to top
View user's profile Send private message
zm0d
Master Cheater
Reputation: 7

Joined: 06 Nov 2013
Posts: 423

PostPosted: Tue Dec 17, 2013 4:41 pm    Post subject: Reply with quote

You're dealing with multi level pointers, specially with a level 1 pointer (1 offset). Take a look at this thread and SteveAndrews method. This one makes a great job! Smile

http://forum.cheatengine.org/viewtopic.php?t=569620&postdays=0&postorder=asc&start=15
Back to top
View user's profile Send private message
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