SetWindowsHookEx函数用于Mac OS X? [英] SetWindowsHookEx for Mac OS X?

查看:175
本文介绍了SetWindowsHookEx函数用于Mac OS X?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

windows钩子可以让你捅其他进程里面,有时改变他们的行为。

Windows hooks allows you to poke inside other processes and sometimes alter their behaviors.

是否有适用于Mac OS X这样的事情?

Is there such thing for Mac OS X?

谢谢!

推荐答案

和SetWindowsHookEx 更像是老 InputManager 黑客在您从一个共享库中更改应用程序的code感/插件加载到它。

SetWindowsHookEx is more like the old InputManager hack, in the sense that you change the code of an app from inside a shared library / a plugin loaded to it.

请参阅 SIMBL 一个现成的code注入到另一个处理。对于Objective-C类,然后需要使用方法交叉混合。我没试过替换C函数/ C ++类的自己,但肯定它可以使用 mach_override 。另请参见这个博客帖子

See SIMBL for a ready-made code injector to another process. For Objective-C classes, you then need to use method swizzling. I haven't tried replacing C functions / C++ classes myself, but surely it can be done using mach_override. See also this blog post.

但通常,如果你想修改一个GUI应用程序,攻到Objective-C类就足够了。

But usually if you want to modify a GUI app, tapping into Objective-C classes would be sufficient.

这篇关于SetWindowsHookEx函数用于Mac OS X?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆