You have to directly modify the dispatch table.
-jjf
-----Original Message-----
From: Adam Wozniak [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 10, 2000 11:19 AM
To: Palm Developer Forum
Subject: Re: how to trap system library functions?
"Fitzpatrick, Joe" wrote:
> If you just want to modify the behavior of a few calls, there is a
> possibly easier way.
>
> All libraries use the same trap numbers for entry points. That is way
> all library calls require a 'lib ref' parameter. The ref. determines
> which library is actually invoked via a function table. If you just
> wanted to modify one or two functions, you could replace those two
> traps, saving the original trap address off in a feature.
>
> Then, each time your replacement trap(s) is called, check the library
> reference. If it is not the library you are augmenting, just pass the
> trap on. If it is the library you are augmenting, do your encoding,
> then pass it on.
Been there, tried that.
SysGetTrapAddress() / SysSetTrapAddress() do not work for the
library traps, at least not in PalmOS 3.1, 3.2, and 3.3.
--
Adam Wozniak
Senior Software Design Engineer
Surveyor Corporation
4501 Orcutt Rd.
San Luis Obispo, CA 93401
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html