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++ Freezing Adresses and Changing Values like in Cheat Eng.

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

Joined: 24 Dec 2007
Posts: 2

PostPosted: Thu May 15, 2008 1:19 pm    Post subject: C++ Freezing Adresses and Changing Values like in Cheat Eng. Reply with quote

Like the Topic says i want know how to be able to Freeze and Change Values in C++.

I am creating a Hack for Crysis (Nametag Hack) and i need to add this Function cause it needs to change a Value to 99999 and Freeze it . Would be happy if you guys could help me Smile

I used Search but i cant really find something familiar.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu May 15, 2008 1:24 pm    Post subject: Reply with quote

detect the address you need for doing whatever you want and then use the ReadProcessMemory / WriteProcessMemory to read & write to this address
about the freezing thing like in cheat engine just loop the part when you're writing with WriteProcessMemory

information about WriteProcessMemory & ReadProcessMemory
ReadProcessMemory - http://msdn.microsoft.com/en-us/library/ms680553.aspx
WriteProcessMemory - http://msdn.microsoft.com/en-us/library/ms681674.aspx

_________________
Stylo
Back to top
View user's profile Send private message
alexanderjanjic
How do I cheat?
Reputation: 0

Joined: 24 Dec 2007
Posts: 2

PostPosted: Thu May 15, 2008 2:31 pm    Post subject: Reply with quote

Could you maybe give me an exapmle Code Smile
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu May 15, 2008 4:55 pm    Post subject: Reply with quote

Uhh, this depends.

If you're wanting to do this from a DLL, you'd just do something like

Code:

#include <windows.h> //for Sleep

BOOL bQuit = false;
DWORD val; //depends on the size, change the definition to fit what you need

void freezeVar() {
     while( !bQuit ) {
          *(char *)0xaddress = val;
          Sleep(100);
          }
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwMsg, LPVOID lpReserved)
{
   switch( dwMsg )
   {
   case DLL_PROCESS_ATTACH:
      DisableThreadLibraryCalls( hModule );
                val = 1337;
      CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)freezeVar, NULL, 0, 0 );
      return TRUE;
   case DLL_PROCESS_DETACH:
      bQuit = true;
      return TRUE;
   }
   return TRUE;
}

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
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