WoW API: hooksecurefunc

From AddOn Studio
Revision as of 06:04, 26 December 2006 by WoWWiki>Endx7
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < hooksecurefunc

Creates a secure 'post hook' for the named function. The hookfunc is invoked after the original function, and receives the same parameters. Return values from hookfunc are discarded. This is the only safe way to hook functions that execute protected functionality.

hooksecurefunc([table,] "functionName", hookfunc)

Takes

table
table which functionName exists on
"functionName"
the name of the function being hooked
hookfunc
the hook function

Returns

Nothing

Details

  • After hooksecurefunc() is used on a function, setfenv() throws an error when attempted on that function