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 


[DELPHI] Resultin NIL if pointer point to invalid address ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
crapped
How do I cheat?
Reputation: 0

Joined: 14 Nov 2011
Posts: 8

PostPosted: Mon Nov 14, 2011 9:21 am    Post subject: [DELPHI] Resultin NIL if pointer point to invalid address ? Reply with quote

Well im absolutely curious how to do that in delphi

well i have a trainer with threading timer to read the value

well everytime i start game it display negative exponent( i think thats the name) 1,74356281163922E-39 before load the savegame

whats the exact method to display '?????' if pointer point to wrong address ?

ive tried reading cheat engine source but i dunno where its located since CE have a huge and pretty complex source.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Nov 14, 2011 11:07 am    Post subject: Reply with quote

simple: If any of the readprocessmemory calls returns false just return ????????
_________________
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
crapped
How do I cheat?
Reputation: 0

Joined: 14 Nov 2011
Posts: 8

PostPosted: Mon Nov 14, 2011 11:30 am    Post subject: Reply with quote

Damn youre my hero!!, its work...

well i dunno if i can wrap readprocess in var..
been spending time to find solution using IsBadReadPTR

Thank you again thankyou! *kisses.
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: Mon Nov 14, 2011 11:38 am    Post subject: Reply with quote

IsBadReadPtr wont work unless you are injected into the process. The address passed to IsBadReadPtr is checked against the current processes memory, not the one you are targeting.

ReadProcessMemory returns a boolean, just check if it fails. If it doesn't then you can either assume the pointer is valid, or you have read invalid data. If you can assume the data is supposed to be a specific value, or at least within a specific range you can double check using that as well.

Such as if the memory you are reading is a string, you can check if the first character is valid and not null. Or if you are reading an integer, if the value can only be within a specific range you can check that as well and so on.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
crapped
How do I cheat?
Reputation: 0

Joined: 14 Nov 2011
Posts: 8

PostPosted: Mon Nov 14, 2011 12:06 pm    Post subject: Reply with quote

Thank you wiccan for giving me more knowledge!

thats why im confused because theres no bridge using IsBadReadPTR to read from target processes.

i would gladly comeback to ask or giving some contribution if i could
since this is my second time asking ppl when im stuck (except to google)
and the answer is pretty fast and helpfull..

Thanks before.
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
Page 1 of 1

 
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