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++] BYTE [ ] to BYTE * ?
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
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Mar 09, 2008 2:39 pm    Post subject: Reply with quote

Symbol wrote:
But, when you push a 4 bytes value, doesn't it read the value in thats address, and doesn't treat it as a value? if it does, this code will throw an exception, then simply push 01 instead of push 00000001.


No, the function is looking for an integer value, not a pointer to one.

Edit: To show this: try passing a pointer, all it will do is write the address of the value.
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: Sun Mar 09, 2008 9:42 pm    Post subject: Reply with quote

@Symbol: What Flyte said. As I said in my other post, it was my mistake for saying memset over memcpy. memset's 2nd param is just an int value. It repeats the given value for the size you give it. Reason why it wrote 01 4 times.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Aviram
Grandmaster Cheater
Reputation: 0

Joined: 30 Jun 2006
Posts: 633

PostPosted: Thu Mar 13, 2008 6:30 am    Post subject: Reply with quote

LOL
Symbol cuz of u I used memset and it fucked up my maple and I was like
OMG WHAT IS GOING on?
xDDD
Glad I saw this thread.
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