a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Static lib:
 amiga.lib
  ACrypt
  AddTOF
  ArgArrayDone
  ArgArrayInit
  ArgInt
  ArgString
  BeginIO
  CallHook
  CallHookA
  CheckRexxMsg
  CoerceMethod
  CoerceMethodA
  CreateExtIO
  CreatePort
  CreateStdIO
  CreateTask
  CxCustom
  CxDebug
  CxFilter
  CxSender
  CxSignal
  CxTranslate
  DeleteExtIO
  DeletePort
  DeleteStdIO
  DeleteTask
  DoMethod
  DoMethodA
  DoSuperMethod
  DoSuperMethodA
  FastRand
  FreeIEvents
  GetRexxVar
  HookEntry
  HotKey
  InvertString
  LibAllocPooled
  LibCreatePool
  LibDeletePool
  LibFreePooled
  NewList
  RangeRand
  RemTOF
  SetRexxVar
  SetSuperAttrs
  TimeDelay
  afp
  arnd
  dbf
  fpa
  printf
  sprintf
  stdio
Include
GuruMeditation
Docs » Autodocs » amiga.lib » CallHook

NAME

	CallHook -- Invoke a hook given a message on the stack.

SYNOPSIS

	result = CallHook( hookPtr, obj, ... )
ULONG CallHook( struct Hook *, Object *, ... );

FUNCTION

	Like CallHookA(), CallHook() invoke a hook on the supplied
hook-specific data (an "object") and a parameter packet ("message").
However, CallHook() allows you to build the message on your stack.

INPUTS

	hookPtr - A system-standard hook
obj - hook-specific data object
... - The hook-specific message you wish to send. The hook is
expecting a pointer to the message, so a pointer into your
stack will be sent.

RESULT

	result - a hook-specific result.

NOTES

	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.

EXAMPLE

	If your hook's message was
struct myMessage
{
ULONG mm_FirstGuy;
ULONG mm_SecondGuy;
ULONG mm_ThirdGuy;
};
You could write:
result = CallHook( hook, obj, firstguy, secondguy, thirdguy );
as a shorthand for:
struct myMessage msg;
msg.mm_FirstGuy = firstguy;
msg.mm_SecondGuy = secondguy;
msg.mm_ThirdGuy = thirdguy;
result = CallHookA( hook, obj, &msg );

SEE ALSO

CallHookA(), utility.library/CallHookPkt(), <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

ATX
DJ
TRSI
RBS

Comments:

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