>I am trying to create a hack monitoring calls to the net library. >But it doesn't seem to work - the traps do not execute my code >and uninstalling the hack crashes X-Master. Trapping a "normal" >trap seems to work just fine. Is there a fundamental problem? >If so, is there a workaround (in prc-tools/Linux)?
I believe there's a fundamental problem. NetLib is a shared library, so all of the functions it publicly defines are library trap calls, where the OS determines which library to call based on the refnum that gets pushed on the stack. So if you patch NetLibSocketOpen, as an example, you're patching trap 0xA807, which means that you're actually patching every open library's second custom routine. The topic of how to patch shared library routines has come up in the past - search the archives. But IIRC the bottom line is that there's no easy solution. -- Ken -- Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
