Difference between revisions of "Help File:sym generateAPIHookScript"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "==sym_generateAPIHookScript== This function takes several strings and convert it into a working ''AutoAssembler'' script. '''Function Definition''' ''BOOL sym_addressToName...")
 
m
 
Line 10: Line 10:
 
                           int maxscriptsize);''
 
                           int maxscriptsize);''
  
;'''Address'''
+
;'''address'''
 
:The address you want to hook. (e.g. "00401234", "somegamemod.dll+1234" or "apidll!functionname")
 
:The address you want to hook. (e.g. "00401234", "somegamemod.dll+1234" or "apidll!functionname")
  
Line 25: Line 25:
 
:Ensures the script won't exceed the buffer.
 
:Ensures the script won't exceed the buffer.
  
Returns '''TRUE''' if the script was properly generated and there was enough space. The script will be filled with the script you can feed to the Auto Assembler.
+
Returns ''TRUE'' if the script was properly generated and there was enough space. The script will be filled with the script you can feed to the Auto Assembler.
  
  

Latest revision as of 01:36, 30 July 2021

sym_generateAPIHookScript[edit]

This function takes several strings and convert it into a working AutoAssembler script.

Function Definition

BOOL sym_addressToName (char *address,
                          char *addresstojumpto,
                          char *addresstogetnewcalladdress,
                          char *script,
                          int maxscriptsize);
address
The address you want to hook. (e.g. "00401234", "somegamemod.dll+1234" or "apidll!functionname")
addresstojumpto
Address of the routine you want to jump to. (e.g. "mydll!myhook" or just a static address like "0x12345678").
addresstogetnewcalladdress
Address to store the address of the routine in so you can call it without the hook. (Useful when you want to call the original routine from your own hook).
script
Output a pointer to a buffer where you want the script in.
maxscriptsize
Ensures the script won't exceed the buffer.

Returns TRUE if the script was properly generated and there was enough space. The script will be filled with the script you can feed to the Auto Assembler.