a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 utility.library
  AddNamedObject
  AllocNamedObjectA
  AllocateTagItems
  Amiga2Date
  ApplyTagChanges
  AttemptRemNamedObject
  CallHookPkt
  CheckDate
  CloneTagItems
  Date2Amiga
  FilterTagChanges
  FilterTagItems
  FindNamedObject
  FindTagItem
  FreeNamedObject
  FreeTagItems
  GetTagData
  GetUniqueID
  MapTags
  NamedObjectName
  NextTagItem
  PackBoolTags
  PackStructureTags
  RefreshTagItemClones
  ReleaseNamedObject
  RemNamedObject
  SDivMod32
  SMult32
  SMult64
  Stricmp
  Strnicmp
  TagInArray
  ToLower
  ToUpper
  UDivMod32
  UMult32
  UMult64
  UnpackStructureTags
Include
GuruMeditation
Docs » Autodocs » utility.library » CallHookPkt

NAME

	CallHookPkt -- invoke a Hook function callback. (V36)

SYNOPSIS

	return = CallHookPkt(hook,object,message);
D0 A0 A2 A1
ULONG CallHookPkt(struct Hook *,APTR,APTR);

FUNCTION

	Performs the callback standard defined by a Hook structure.
This function is really very simple; it effectively performs
a JMP to Hook->h_Entry.
It is probably just as well to do this operation in an
assembly language function linked in to your program, possibly
from a compiler supplied library or a builtin function.
It is anticipated that C programs will often call a 'varargs'
variant of this function which will be named CallHook. This
function must be provided in a compiler specific library, but
an example of use would be:
result = CallHook(hook,dataobject,COMMAND_ID,param1,param2);
The function CallHook() can be implemented in many C compilers
like this:
ULONG CallHook(struct Hook *hook, APTR object, ULONG command, ... )
{
return(CallHookPkt(hook,object,(APTR)&command));
}

INPUTS

	hook - pointer to an initialized Hook structure as defined in
<utility/hooks.h>
object - useful data structure in the particular context the hook is
being used for.
message - pointer to a message to be passed to the hook. This is not
an Exec Message structure, but is a message in the OOP sense.

RESULT

	return - the value returned by the hook function.

WARNING

	The functions called through this function should follow normal
register conventions unless EXPLICITLY documented otherwise (and
they have a good reason too).

SEE ALSO

<utility/hooks.h>

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Defjam

ANA
AYS
DJ
PHA

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se