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 


Help w/ String and Array [delphi]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
fjfc
Advanced Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 91

PostPosted: Fri Apr 18, 2008 5:27 pm    Post subject: Help w/ String and Array [delphi] Reply with quote

Does any1 knows how can i transform a String like 'fjfc' in a array of bytes to write on memory?

ty
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Fri Apr 18, 2008 5:33 pm    Post subject: Reply with quote

typecast it? It already is an array of bytes.
Back to top
View user's profile Send private message MSN Messenger
fjfc
Advanced Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 91

PostPosted: Fri Apr 18, 2008 5:41 pm    Post subject: Reply with quote

no man.. transform a string like 'aaa' is a array of sting like 61 61 61 and write it to memory

============edit

forgive it guys... i just found a sollution
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Fri Apr 18, 2008 5:56 pm    Post subject: Reply with quote

Code:
char aaa[] = "aaa";
printf( "%x", aaa[0] );


Prints 61. chars are just bytes stored in memory.
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Fri Apr 18, 2008 6:18 pm    Post subject: Reply with quote

Code:

var a: pbytearray;
...
a:=@stringname[1];


now you can work with a as an array of bytes
If you wanted it as a pchar then
Code:

var a: pchar;
...
a:=pchar(stringname);

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