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 


FAQ: How to use a pointer
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Sep 05, 2009 11:31 am    Post subject: Reply with quote

pointers on all 32 bit systems are 4 byte
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sat Sep 05, 2009 12:31 pm    Post subject: Reply with quote

to explain further since people still think there's a difference:
A pointer to a 1 byte value is 4 bytes
A pointer to a 2 byte value is 4 bytes
A pointer to a 4 byte value is 4 bytes
A pointer to a 8 byte value is 4 bytes
a pointer to a float is 4 bytes
a pointer to a double is 4 bytes
a pointer to a string is 4 bytes

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

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

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Sep 05, 2009 4:34 pm    Post subject: Reply with quote

a pointer is saying the address of an object. so we say the address POINTS TO something. so say we had an object of 1 byte, then to locate WHERE it is in memory, there is an address for that object. the address IS THE POINTER

a pointer is simply a 4 byte value containing the address of an object. a pointer to a pointer would be a 4 byte value that holds the address of the pointer to the object
Back to top
View user's profile Send private message
tomcat
How do I cheat?
Reputation: 0

Joined: 09 Oct 2008
Posts: 2

PostPosted: Sun Nov 15, 2009 1:41 pm    Post subject: Reply with quote

Hi i tried this but now i have one problem. How can i prevent a crash when I try to read an adress that does not exists?
I have 3th level Pointer and the last adress does only exist sometimes ^^
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Sun Nov 15, 2009 2:54 pm    Post subject: Reply with quote

tomcat wrote:
Hi i tried this but now i have one problem. How can i prevent a crash when I try to read an adress that does not exists?
I have 3th level Pointer and the last adress does only exist sometimes ^^
Windows specific: IsBadReadPtr, IsBadWritePtr.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Nov 15, 2009 3:12 pm    Post subject: Reply with quote

alternatively __try/__except()
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Nov 15, 2009 3:17 pm    Post subject: Reply with quote

Jani wrote:
Windows specific: IsBadReadPtr, IsBadWritePtr.


They actually aren't all that good for crash protection: http://blogs.msdn.com/oldnewthing/archive/2006/09/27/773741.aspx
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Nov 15, 2009 4:27 pm    Post subject: Reply with quote

Athaem wrote:
Jani wrote:
Windows specific: IsBadReadPtr, IsBadWritePtr.


They actually aren't all that good for crash protection: http://blogs.msdn.com/oldnewthing/archive/2006/09/27/773741.aspx

In the case that tomcat is interested in, those functions are acceptable.

You may wish to read this : http://www.cc.gatech.edu/fce/ctk/pubs/PeTe5-1.pdf
Back to top
View user's profile Send private message
tomcat
How do I cheat?
Reputation: 0

Joined: 09 Oct 2008
Posts: 2

PostPosted: Sun Nov 15, 2009 6:42 pm    Post subject: Reply with quote

can someone show me how to use one of this solutions?
I'm pretty new in c++ and dont get it Sad
Back to top
View user's profile Send private message
elshabory
Newbie cheater
Reputation: 0

Joined: 02 Mar 2011
Posts: 20

PostPosted: Sat Mar 12, 2011 11:16 am    Post subject: Reply with quote

can you kindly rewrite this code in delphi
Back to top
View user's profile Send private message
dpdsbd
How do I cheat?
Reputation: 0

Joined: 12 Feb 2014
Posts: 8

PostPosted: Wed Feb 12, 2014 2:12 pm    Post subject: Reply with quote

Thank you for the FAQ - however I'm not sure I understood it correctly. I have following values in CE:

(see attachment)

So if I unerstood correctly:

First step (mdnsNSP.dll+0001ED30) gives me 01132380
Second step - 01132380 + 540 should give me 00D4E1A4
When i add them as HEX - [0113280] + 540 = 11328C0, not the value above - what am I doing wrong?



snipp.PNG
 Description:
 Filesize:  12.8 KB
 Viewed:  51428 Time(s)

snipp.PNG


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Feb 12, 2014 2:40 pm    Post subject: Reply with quote

it's [01132380 + 540] not [01132380] + 540
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

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

Joined: 12 Feb 2014
Posts: 8

PostPosted: Wed Feb 12, 2014 2:51 pm    Post subject: Reply with quote

Ok but what is the real difference - sorry but I'm spend whole day trying to figure it out and going through tons of stuff & tutorials - it being in the brackets means I should add it in a special way?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Feb 12, 2014 3:02 pm    Post subject: Reply with quote

Read the 4 byte value stored at 01132380 + 540 (So read the 4 bytes at 11328C0 and use that result for the next step)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

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

Joined: 12 Feb 2014
Posts: 8

PostPosted: Wed Feb 12, 2014 3:13 pm    Post subject: Reply with quote

Right, I got it now - the problem was that I was using returned value as Hex not as Decimal.

Thank you very much! Karma+1 for you Smile
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, 3  Next
Page 2 of 3

 
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