API hooksecurefunc

Creates a secure "post hook" for the specified function. Your hook will be called with the same arguments after the original call is performed. hooksecurefunc([table,] "functionName", hookfunc)

Arguments

 * table : Optional Table - Table to hook the  key in; if omitted, defaults to the global table.
 * functionName : String - name of the function being hooked.
 * hookfunc : Function - your hook function.

Example
The following calls hook and  without compromising their secure status. When those functions are called, the hook prints their argument list into the default chat frame. hooksecurefunc("CastSpellByName", print); -- Hooks the global CastSpellByName hooksecurefunc(GameTooltip, "SetUnitBuff", print); -- Hooks GameTooltip.SetUnitBuff