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 


Cheat engine how to directly call the API command?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 159

PostPosted: Tue Mar 19, 2019 7:30 am    Post subject: Cheat engine how to directly call the API command? Reply with quote

Call the API like this:
Code:

[ENABLE]
alloc(click,8)
createthread(click)

click:
push 0
push 0
push 0
push 0
call mouse_event
ret

[DISABLE]


I don't want to use this form to call api, cheat engine can be called like other programming languages:
getmodulehandle('kernel32.dl')
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Tue Mar 19, 2019 8:55 am    Post subject: Reply with quote

If you don't want to write assembly yourself, use a C/C++ compiler w/ Windows ABI conventions and copy the assembly generated from it.

Lua is also an option in this case. celua.txt:
Quote:
mouse_event(flags, x OPTIONAL, y OPTIONAL, data OPTIONAL, extra OPTIONAL) - The mouse_event windows API. Check MSDN for information on how to use

Use a search engine for examples.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 159

PostPosted: Tue Mar 19, 2019 5:17 pm    Post subject: There are not all apis in celua.txt Reply with quote

Then what if I want to call this? Getmodulehandle('kernel32.dl') can be written directly in lua?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Tue Mar 19, 2019 11:55 pm    Post subject: Reply with quote

inside the target process or in CE ?
(look at executeCodeEx for target)

(in ce you can do getAddresSafe("kernel32.dll",true) to get kernel42 in the ce process)

_________________
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
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 159

PostPosted: Wed Mar 20, 2019 6:52 am    Post subject: help me! Reply with quote

I said it directly: I want to attach the ce process, and then write the handle to the writerprocessmemory by calling openprocess to write the kernel32.dll module in the game. The problem is the address of the module. Do I need to use the cheat engine to make it work? ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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