This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! How to link HOOK_LIB?

sanyabrz

Platinian
Hello everyone, tell me how to connect HOOK_LIB? I'm going to make an offset tester, but I can't connect HOOK_LIB to functions. It seems like the quotes are in the way, if you remove them the error remains, it just crashes.

HOOK_LIB("MY.libname", "MY.offsetToUpdateField", HookField,_HookField); - don't working.
HOOK_LIB(MY.libname, MY.offsetToUpdateField, HookField,_HookField); - don't working

I took the LGL mod menu as a basis.
 
can you send the define for it?

it should look like this:
#define HOOK_LIB(...
#define MY_HOOK(lib, offset, ptr, orig) hook((void *)getAbsoluteAddress(lib, string2Offset(offset)), (void *)ptr, (void **)&orig)
done

when I paste this into aarch64 the game crashes on startup

I need to do it for 64 bit. but 32 bit works when I insert this into cases.
so i use aarch64

my code that crashes on startup:

#if defined(__aarch64__)

MY_HOOK(MY.libname, MY.offsetToUpdateField, HookField,_HookField);

#else

LOGI(OBFUSCATE("Done"));
#endif