How do I override system APIs?

Do you need to detect some special occurence for which the Mac OS doesn't send a notification? Do you have old code that used to employ "trap patching" that you need to port to Mac OS X? Have you checked all existing Cocoa, Carbon and Unix APIs, and none of them provides the solution? Here's a URL to an article that might help.


http://www.rentzsch.com/papers/overridingMacOSX
Do you need to detect some special occurence for which the Mac OS doesn't send a notification? Do you have old code that used to employ "trap patching" that you need to port to Mac OS X? Have you checked all existing Cocoa, Carbon and Unix APIs, and none of them provides the solution? Here's a URL to an article that might help.

Jonathan "Wolf" Rentzsch wrote an award-winning article about code injection and function overriding on Mac OS X. You can find it at