Call
Call any function at an address using the x64 calling convention.
Syntax
Susano.Memory.Call(address, signature, ...) -> ...
Parameters
address (integer): Function address.
signature (string): Format is "<return>:<args>" where each character is a type:
v: voidi: int32l: int64 / longb: boolf: floatd: doublep: pointer (integer,nilis treated as0)s: string (const char*)
The character before : is the return type, the characters after : are the argument types (maximum 16 args).
... : Argument values matching the signature types.
Return(s)
Depends on the return type in the signature. void returns nothing.
Example(s)
-- void func(int, int)
Susano.Memory.Call(addr, "v:ii", 1, 2)
-- int64 func(pointer, int)
local result = Susano.Memory.Call(addr, "l:pi", entityPtr, 42)
-- float func(float, float)
local dist = Susano.Memory.Call(addr, "f:ff", 1.0, 2.0)
-- no-arg function returning int64
local tick = Susano.Memory.Call(tickProc, "l:")
-- pointer func(string)
local ret = Susano.Memory.Call(addr, "p:s", "hello")