#[unsafe(no_mangle)]pub unsafe extern "C" fn getAbsoluteAddress(
library: *const c_char,
offset: usize,
) -> usizeExpand description
C FFI: Convert a relative offset to an absolute address.
This is the most commonly used function from C/C++ for hooking.
§Safety
The library parameter must be a valid null-terminated C string.
§Returns
Absolute address, or 0 if the library cannot be found.
§Examples (C)
uintptr_t addr = getAbsoluteAddress("libil2cpp.so", 0x123456);