[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

	HookEntry -- Assembler to HLL conversion stub for hook entry.

	result = HookEntry( struct Hook *, Object *, APTR )
	D0                  A0             A2        A1

	By definition, a standard hook entry-point must receive the
	hook in A0, the object in A2, and the message in A1.  If your
	hook entry-point is written in a high-level language and is
	expecting its parameters on the stack, then HookEntry() will
	put the three parameters on the stack and invoke the function
	stored in the hook h_SubEntry field.

	This function is only useful to hook implementers, and is
	never called from C.

	hook - pointer to hook being invoked
	object - pointer to hook-specific data
	msg - pointer to hook-specific message

	result - a hook-specific result.

	This function first appeared in the V37 release of amiga.lib.
	However, it does not depend on any particular version of the OS,
	and works fine even in V34.

	If your hook dispatcher is this:

	dispatch( struct Hook *hookPtr, Object *obj, APTR msg )

	Then when you initialize your hook, you would say:

	myhook.h_Entry = HookEntry;	/* amiga.lib stub */
	myhook.h_SubEntry = dispatch;	/* HLL entry */

	CallHook(), CallHookA(), <utility/hooks.h>

[Back to Amiga Developer Docs]