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++] Get current dynamic address
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
itsoqrappy
Advanced Cheater
Reputation: 0

Joined: 24 Mar 2016
Posts: 67

PostPosted: Sat Mar 26, 2016 7:12 am    Post subject: Reply with quote

atom0s wrote:
Unless you post your full code there isn't much we can do to really determine what the problem is. You're probably still doing something incorrect.


I was asking you for an example of using VirtualProtect. If you don't want to, nevermind.
My real question was if I had to VirtualProtect just for writing to memory or for reading memory too.

My actual code:
Code:


Last edited by itsoqrappy on Wed Apr 27, 2016 12:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Mar 26, 2016 6:53 pm    Post subject: Reply with quote

Your using VirtualProtect fine, so it means that your pointers are incorrect. You'll have to debug to find out where its going wrong or add some debug output.

By using pointer checks and stuff, I was referring to doing things like:

Code:

auto address = *(DWORD*)(baseAddress + PlayerCanReload);
if (address == 0) {
    // do something here since the pointer was 0..
}

_________________
- 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