(C) 1998 AROS - The Amiga Research OS


NAME
#include <utility/hooks.h>
#include <aros/asmcall.h>
#include <proto/utility.h>

IPTR CallHookPkt (hook , object , paramPacket)

LOCATION
In UtilityBase at offset 17

SYNOPSIS
struct Hook * hook
APTR object
APTR paramPacket

FUNCTION
Call the callback hook defined by a Hook structure. This is effectively a long jump to the hook->h_Entry vector of the structure.

The Hook will be called with the same arguments as this function. If your compiler cannot support correctly registered arguments (most can), you can use the HookEntry function defined in amiga.lib to push the arguments on the stack and call your function.

See the include file utility/hooks.h for more information.

INPUTS
hook
Pointer to an initialized Hook structure. See the include file <utility/hooks.h> for a definition.
object
The object that this Hook is to act upon.
paramPacket
The arguments to this callback. This will depend entirely on the type of the object.

RESULT
Depends upon the Hook itself.

EXAMPLE

SEE ALSO
amiga.lib/ CallHook()

NOTES

BUGS
If your callback function does not have the correct register definitions, the result of this function is entirely unreliable.

You can get the correct register definitions by using the AROS_UFHA() macros (See <utility/hooks.h>).

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
20.08.1997 digulla
Polish.

Renamed utility_intern.h to intern.h.

09.02.1997 iaint
Fixed some nasty bugs in NamedObjects
27.01.1997 ldp
Polish
27.12.1996 iaint
Use UFC macro for registerized params
10.12.1996 aros
Moved #include into first column to allow makedepend to see it.
24.10.1996 aros
Use the official AROS macros over the __AROS versions.
28.08.1996 digulla
Two more functions