Yes, it is possible to hook a library call, but it is not trivial. System calls are basically a 68K 'trap' instruction followed by a function number. The trap handler retrieves the function number and uses it to look up the appropriate function address. Shared libraries all reuse the same block of function numbers. That's why you always need to pass a library reference parameter when you call into them. There is basically an extra level of redirection. Trap->Trap handler->stock function->use libref to lookup actual function... You cannot use the standard system calls to patch the shared library function calls directly, but there are games you can play. One technique is to take over library loading and finding and then hook what you are interested. Good Luck, -jjf -----Original Message----- From: gcw [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 13, 2000 5:12 PM To: Palm Developer Forum Subject: can you "hack" calls in a system shared library? I'm trying to create a patch for a call provided by the "network library" via the hackmaster protocol. I've been able to implement these patches for system calls in the API proper ( for example, FrmDrawForm ) , but have had no luck doing the same for calls in system shared libraries ( for example, NetLibSocketOpen ). Any one know what I might be doing wrong here? Is it even possible to "hack" around calls in system shared libraries? Thanx! -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
