UnhookMultiple(function, handle, handle)

grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » UnhookMultiple(function, handle, handle) Version 2.1

説明

The UnhookMultiple Lua function unhooks multiple hooks based on an input. This input acts like a filter to identify all the hooks that should be unhooked.

The DumpAllHooks function can be used to list all the existing hooks in the system.

引数

  • function または nil:
    This must be the name of a triggered function or nil.
  • handle または nil:
    This must be the handle for the target object or nil.
  • handle または nil:
    The must be the handle for the context object or nil.

The target and context names can be seen using the DumpAllHooks function.

戻り値

  • integer:
    The function returns an integer indicating how many hooks were unhooked.


ヒント
See also these related functions: DumpAllHooks, HookObjectChange, Unhook.

This example unhooks all hooked related to the function created in the example for the HookObjectChange - please run the example from that topic before running this one.

Lua
return function ()
-- Unhooks all hooks related to the "MySequencePoolCallback" function.
local amount = UnhookMultiple(MySequencePoolCallback)
-- Print how many hooks that were unhooked.
Printf(amount .. " hook(s) were unhooked.")
end