mach_inject used to enter code into an arbitrary Mac OS X process, however mach_override redefines the code within the same process. You can see an example of use as in my FinderMenu project, which adds elements to the Finder context menu. In this project, I use mach_inject to load my custom package into the Finder process, and then mach_override to replace the context menu class method.
source share