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 


Questions on ReadProcessMemory()

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
False Prophet
Expert Cheater
Reputation: -1

Joined: 28 May 2006
Posts: 121

PostPosted: Mon Oct 26, 2009 6:42 am    Post subject: Questions on ReadProcessMemory() Reply with quote

How would you use ReadProcessMemory() to read a text string?

For example, how would I read a string that with the memory address 22902f02, text strings can be 136 characters long?

I am using Visual Basic for this.
(Don't chastise...)

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

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

PostPosted: Mon Oct 26, 2009 8:11 am    Post subject: Reply with quote

general method:
allocate a buffer of at least 137 bytes
readprocessmemory 136 bytes into that buffer
place a 0 terminator at the last byte of the buffer
and handle that buffer as a string

_________________
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
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Oct 26, 2009 2:33 pm    Post subject: Reply with quote

Dark Byte: You don't have to put a /0 terminator if you used VirtualAlloc w/ MEM_COMMIT.
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Mon Oct 26, 2009 3:13 pm    Post subject: Reply with quote

&Vage wrote:
Dark Byte: You don't have to put a /0 terminator
What's a /0 terminator?
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Mon Oct 26, 2009 3:16 pm    Post subject: Reply with quote

Jani wrote:
&Vage wrote:
Dark Byte: You don't have to put a /0 terminator
What's a /0 terminator?


NULL terminating character.
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Mon Oct 26, 2009 3:21 pm    Post subject: Reply with quote

smartz993 wrote:
Jani wrote:
&Vage wrote:
Dark Byte: You don't have to put a /0 terminator
What's a /0 terminator?
NULL terminating character.
NULL terminating character is '\0'. /0 is actually two characters.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Oct 26, 2009 3:41 pm    Post subject: Reply with quote

Whoops \* sorry.
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