|
Dynamic Override Example
This function overriding and cross-process code copying can be heady stuff to get your head around.
To ease the learning curve, I've whipped up some sample code (48K). The code is simple -- a DisposeWindow() head-patch located in DisposeWindowBeeperOverride.bundle is installed into the Finder by FinderDisposeWindowBeeperInjector. As you may guess by the name, the head patch is simple -- it merely printf()'s "beep!" and calls SysBeep() before calling through to the original implementation.
Also, while this example includes the code to mach_override and mach_inject, please take a look at each project's respective pages to ensure you're using the latest revisions.
Thursday, July 03, 2003
11:42 PM
|