At 03:10 PM 9/20/2002 -0400, you wrote:
>HI,
>
>I know that SysGetTrapAddress() works on both OS4.1 and OS5.0 but
>I need to know if I can just assign a variable to a function without
>Using SysGetTrapAddress().
>
>So, to answer my question what is the correct way to obtain a function
>Address without using SysGetTrapAddress()?

For normal functions, your syntax works right.  For Palm OS system calls, 
you have to use SysGetTrapAddress -- you can't take the address of 
SysTaskDelay directly, since there is no address to jump to -- to call the 
routine, the compiler actually emits a "TRAP" instruction followed by the 
trap number for the call.

-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to