Skip to main content
تعمل hook لـ target function باستخدام replacement function وتعيد cloned copy من original target closure. يجب أن يكون كلا arguments من type functions. تبدأ function بعمل flush لـ pending C function swaps، ثم cloning للـ target عبر function cloning، وتضيف replacement closure أو mapped newcclosure target الخاص بها إلى hidden stack tracking، وتستدعي FixCallstack للـ target و cloned original، ثم تعمل patch للـ target closure عبر C closure أو Luau closure أو newcclosure-specific path. إذا لم يكن target موجودا في hook records، يتم تخزين cloned original هناك من أجل restorefunction. returned function هي cloned original closure.

الصيغة

أسماء بديلة

  • hookfunc
  • replaceclosure
  • detourfunction
  • detour_function

الوسائط

القيم الراجعة

مثال

Patch a function closure and keep a cloned original.