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] Reading Pointers IS FUCKING COOL I'M GOING TO STAB YOU
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
Drops
Advanced Cheater
Reputation: 0

Joined: 22 Feb 2008
Posts: 62

PostPosted: Thu Mar 19, 2009 12:17 pm    Post subject: Reply with quote

Isn't pulValue the variable you pass to the function to store the value of the pointer? So if you did that:

Code:
*(ULONG_PTR*)ulTemp = *pulValue; //Not sure about this point though


all it would be doing is setting whatever is contained in the pointer to the value of pulValue?
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Thu Mar 19, 2009 2:11 pm    Post subject: Reply with quote

Drops wrote:
Isn't pulValue the variable you pass to the function to store the value of the pointer? So if you did that:

Code:
*(ULONG_PTR*)ulTemp = *pulValue; //Not sure about this point though


all it would be doing is setting whatever is contained in the pointer to the value of pulValue?


lol..., what about just giving pulValue the number you wish to write?
Back to top
View user's profile Send private message
Drops
Advanced Cheater
Reputation: 0

Joined: 22 Feb 2008
Posts: 62

PostPosted: Thu Mar 19, 2009 6:29 pm    Post subject: Reply with quote

Anden100 wrote:
Drops wrote:
Isn't pulValue the variable you pass to the function to store the value of the pointer? So if you did that:

Code:
*(ULONG_PTR*)ulTemp = *pulValue; //Not sure about this point though


all it would be doing is setting whatever is contained in the pointer to the value of pulValue?


lol..., what about just giving pulValue the number you wish to write?


Oh sorry, I kept flipping back from his post to yours, missed the fact you modded it for a write function.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Mar 19, 2009 8:36 pm    Post subject: Reply with quote

Nope, it's still fucked up.

Code:
*(ULONG_PTR*)ulTemp = *pulValue;

*ulTemp = ulValue;


Neither of these lines will compile.
ULONG_PTR isn't a pointer to a ULONG, if you had checked to see what ULONG_PTR is even defined as you would know that.

Code:
typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;


As a result you will get an error, which if i remember right, is illegal indirection.

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