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 


Code C++ -> 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: Wed Apr 16, 2008 4:47 pm    Post subject: Code C++ -> Delphi Reply with quote

DWORD ADDRESS = 0x00473980;
*(BYTE*)ADDRESS = 0x7D;

any1 know how is this code in delphi?
like... write bytes using only the structure ( Address = bytes )
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Apr 16, 2008 4:55 pm    Post subject: Reply with quote

dword Address = $00473980;
^(byte^)Address = $7D; // guess on the byte part... someone fix it for me if it needs to be.

_________________
Back to top
View user's profile Send private message
fjfc
Advanced Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 91

PostPosted: Wed Apr 16, 2008 5:22 pm    Post subject: Reply with quote

for(;Wink

e isso ai? que seria um loop... como faz em delphi?
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Apr 16, 2008 5:26 pm    Post subject: Reply with quote

um, me no know what lang your speakin, but im guessing your asking how to do a for loop in delphi? it should be the same in delphi with the exception of putting "do" at the end of it.

for ( ;; ) do

_________________
Back to top
View user's profile Send private message
fjfc
Advanced Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 91

PostPosted: Wed Apr 16, 2008 5:30 pm    Post subject: Reply with quote

portuguese - LoL
i forgived that i was posting at CEF xD
thank you man =}~~


=========


for (;Wink do -> not right


^(byte^)Address = $7D; -> Wrong too
[Error] Project1.dpr(54): Missing operator or semicolon
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Thu Apr 17, 2008 1:48 am    Post subject: Reply with quote

for:
Code:
for I :=1 to 100 do//Always increase "I" by one.
or
for I :=100 downto 1 do//Always decrease "I" by one.

In the var section:
Code:
Address : DWORD;

In the code:
Code:
Address :=$00473980;
Address := $7D;//If i got you right.
Back to top
View user's profile Send private message
fjfc
Advanced Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 91

PostPosted: Thu Apr 17, 2008 3:47 am    Post subject: Reply with quote

is it right?
i think that it'll change the "Address" and no the "Bytes at Address"... cause looki want to write in the memory like i do in c++ ( *(BYTE*)ADDRESS = 0x7D; ) but i dunno how to do in delphi...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Thu Apr 17, 2008 6:47 am    Post subject: Reply with quote

I think it should be:
pbyte($00473980)^:=$7d

typecast address to a pbyte type (pointer to byte type) and dereference it so you can set 7D at that address

Quote:

for(;;)

while true do

_________________
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
fjfc
Advanced Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 91

PostPosted: Thu Apr 17, 2008 11:19 am    Post subject: Reply with quote

thank you so much DB!
it's totally right...

========

Now can someone tell me if it's possible to make pointers (Address+Offset)
not using the ReadProcessMemory?
like... using only ASM code?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Thu Apr 17, 2008 12:24 pm    Post subject: Reply with quote

that's only possible when you're using a injected dll. (or a injected asm script)

mov eax,[baseaddress]
add eax,offset
eax now contains the address you want

multilevel pointer:
e.g level 2:
mov eax,[baseaddress]
add eax,offset1
mov eax,[eax]
add eax,offset2
eax now contains the address...

(note: When reading from the add address pointer form: the bottom offset is offset 1 and goes up from there, so don't get it mixed up)

_________________
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