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 


[Help]Adresses with C++
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 25987
Location: The netherlands

PostPosted: Thu Feb 10, 2011 11:18 pm    Post subject: Reply with quote

Don't copy my exact code, it was more to give an idea
e.g: replace "*(PDWORD)a; " with ReadProcessMemory(ph, (PDWORD)a,&a,4,NULL);

also, do NOT load the library yourself. Use toolhelp32snapshot combined with module32first/module32next

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
xNef
Cheater
Reputation: 0

Joined: 23 Jan 2011
Posts: 25

PostPosted: Fri Feb 11, 2011 7:15 am    Post subject: Reply with quote

zirak wrote:
Code:
   DWORD *level1 = (DWORD*)(*(DWORD*)baseaddress+ 0x44);
   DWORD *level2 = (DWORD*)(*(DWORD*)level1 + 0x14);
   DWORD *level3 = (DWORD*)(*(DWORD*)level2 + 0x34);
   DWORD *level4 = (DWORD*)(*(DWORD*)level3 + 0x08);
   DWORD *level5 = (DWORD*)(*(DWORD*)level4 + 0x98);
   *(DWORD*)level5 = set;


Just put in your base address and you're ready to set the pointed value


When I use (*(DWORD*) the program crash, what is the function of set? Compiler say that was not declared in this scope :S

Code:
*(DWORD*)level5 = set;
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: Fri Feb 11, 2011 12:21 pm    Post subject: Reply with quote

Quote:
external application in c++


Then everything everyone is telling you right now wont work. You need to use ReadProcessMemory if you want to read the memory of another application.

Using pointers like you are now is just reading (or attempting) to read the memory of your application.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
xNef
Cheater
Reputation: 0

Joined: 23 Jan 2011
Posts: 25

PostPosted: Fri Feb 11, 2011 12:33 pm    Post subject: Reply with quote

Im trying to work with pointers, cause in my bot I have to put one line like this:

Code:
cin >> std::hex >> value;
Mainadress= (LPCVOID)(value);


The user have to put the correct adress everytime run the aplication. What I want is to use the multi level pointers instead of cin >> std::hex >> value;
in bot, so the program will be more cool.
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: Fri Feb 11, 2011 1:10 pm    Post subject: Reply with quote

xNef wrote:
Im trying to work with pointers, cause in my bot I have to put one line like this:

Code:
cin >> std::hex >> value;
Mainadress= (LPCVOID)(value);


The user have to put the correct adress everytime run the aplication. What I want is to use the multi level pointers instead of cin >> std::hex >> value;
in bot, so the program will be more cool.


My point is that you can't read the memory of an external application directly. Unless you are injected you can't use what everyone keeps suggesting you use.

You need to use ReadProcessMemory to read the memory of the external application.

_________________
- 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
Goto page Previous  1, 2
Page 2 of 2

 
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