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 


executeMethod and executeCodeEx

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 510

PostPosted: Sat Jan 18, 2025 3:28 pm    Post subject: executeMethod and executeCodeEx Reply with quote

Do these functions can pass parameters into different registers? Or it only works for classinstance in executeMethod?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Jan 18, 2025 4:48 pm    Post subject: Reply with quote

it passes the parameters into different registers yes
_________________
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
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 510

PostPosted: Mon Jan 20, 2025 2:27 pm    Post subject: Reply with quote

It's not, what I see that the rdx/edx register isn't interacted

Sample here
Code:

executeMethod(0, nil, "0x12345678", player.base, {regnr = 2, type = 0,  value=5})


EDIT:
And what I see, it passes two parameter into one classinstance, seems to be broken for 64-bit
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Jan 20, 2025 3:33 pm    Post subject: Reply with quote

ah, you meant in different parameters besides the instance?

no. Only the instance can be given another register, though if it's RCX, use ExecuteCodeEx instead of ExecuteMethod

If you want to set the instance(player.base) to RCX, and RDX to 5 use executeCodeEx(0,nil, "0x12345678", player.base, 5)

if you need to put it in completely different registers like RDI,RSI,RDX,RCX then you'll need to write a function wrapper first that translates the parameters from windows ABI to whatever it is you need to call

_________________
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 -> Cheat Engine Lua Scripting 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