API hooksecurefunc

Creates a secure 'post hook' for the named function. Your hook will be called with the same arguments, but will not be able to affect the outcome of the original call. hooksecurefunc([table,] "functionName", hookfunc)

Arguments

 * table : Optional Table - if you're hooking a function on an object, provide a reference to the object.
 * functionName : String - the name of the function being hooked.
 * hookfunc : Function - your hook function.

Example
hooksecurefunc("CastSpellByName", print); -- Hooks the global CastSpellByName hooksecurefunc(GameTooltip, "SetUnitBuff", print); -- Hooks GameTooltip.SetUnitBuff

Result
Hooks CastSpellByName and GameTooltip.SetUnitBuff without compromising their secure status. When those functions are called, prints their argument list into the default chat frame.