> > I want to get the function's pointer, so that the system can call it
> > directly. can anyone give me the answer?
> If you mean Callback just pass the functions name. This is the pointer
> to a function.
> 

I want to set the systrap address of keyboard, so that my custom keyboard
routine will be called. I try to write a small program to patch the
keyboard function.

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 !!?

Eric

> For example:
> 
>       LstSetDrawFunction(listP, ListBookmarkDrawFunc);
> 
> ListBookmarkDrawFunc is a function.
> 
> 
> This is how it is done in CW. 
> 
> because gcc handles callbacks in an other way, your callback function
> will change a little.
> (neil rhodes p. progr. page 78)
> 
> callbackfunc() {
> 
>       #ifdef __GNUC__
>       CALLBACK_PROLOGUE
>       #endif
>       
>       stuffToDo;
> 
>       #ifdef __GNUC__
>       CALLBACK_EPILOGUE
>       #endif
> 
>       return theValue;
> 
> }
> 
> 
> Hope this is what you want to know.
> 
> bexxx
> 


Reply via email to