> > > VoidPtr SysGetTrapAddress(UInt trapNum)
> > > Err SysSetTrapAddress(UInt trapNum, VoidPtr procP)
> > >
> > > so the thing I need is to get the pointer or direct memory pointer,
> > > VoidPtr procP) of my custom keyboard routine.
> > > any suggestion !!?
> >
> > yes..
>
> SysSetTrapAddress(xxx, (VoidPtr)&routineName);
>
> the keyboard routine need parameter, does the (VoidPtr)&routineName no
> need to include the parameter?
you dont need to do that.. the routine is called 'routineName',
and by saying '&' - you mean.. 'whats the address of'..
as for parameters.. that is handled by the system.. essentially,
your routine (in assembler) will do the required 'modifications'
to the stack for your parameters..
> > where routineName is your 'routine' :>
>
> if a setup program to patch the keyboard, the keyboard routine can
> be in my setup program? because I am not sure that whether my keyboard
> routine can be called after my setup program closed .
dunno.. your question was originally about the function pointers.
but they should work.
az.
--
Aaron Ardiri
Lecturer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 352 8192 A/H: +46 26 10 16 11