This commit is contained in:
lenheart
2024-09-23 18:36:55 +08:00
parent 1a95f22c8a
commit 7bf5fb933d
7 changed files with 477 additions and 2617 deletions

View File

@@ -90,7 +90,7 @@ static SQInteger L_HookFunc(HSQUIRRELVM v)
EXAMPLE_LISTENER(listener)->CallBackOnLeave = CallBackOnLeave;
gum_interceptor_begin_transaction(interceptor);
gum_interceptor_attach(interceptor, GSIZE_TO_POINTER(FuncAddress), listener, GSIZE_TO_POINTER(FuncAddress));
gum_interceptor_attach_listener(interceptor, GSIZE_TO_POINTER(FuncAddress), listener, GSIZE_TO_POINTER(FuncAddress));
gum_interceptor_end_transaction(interceptor);
sq_pushuserpointer(v, listener);
@@ -104,7 +104,7 @@ static SQInteger L_DeHookFunc(HSQUIRRELVM v)
sq_getuserpointer(v, 2, &FuncAddress);
GumInvocationListener *listener = (GumInvocationListener *)FuncAddress;
gum_interceptor_detach(interceptor, listener);
gum_interceptor_detach_listener(interceptor, listener);
return 0;
}

File diff suppressed because it is too large Load Diff