每个程序都有自己的生存空间,在windows系统中你可以在任何时候让你的程序执行一些操作,还可以触发消息,触发的消息分为三种,一是操作你程序的界面,onclick,onmousemove等等,另外一个可以使用windows的消息机制来捕获一些系统消息,但是如果你想在任何时候监控任何程序的情况那可能你就会选择hook来实现了,虽然还有其他方法,但不得不承认,hook是一个比较简单解决问题的途径.
【程序编程相关:中港台譯名對照表簡易語法版 】 【推荐阅读:Delphi 7 中使用RAVE报表(二】windows提供了hook机制,定义为 【扩展信息:第5部分 编译文件(第12页) 】 a callback function provided by an application that receives certain data before the normal recipient of the data. the hook function can thus examine or modify the data before passing it on. 可以使用诸多hook的方式,一下列举一些常用的参数,这些在windwos api帮助中都有: callwndproc ,callwndprocret : the wh_callwndproc and wh_callwndprocret hooks enable you to monitor messages sent to window procedures by the sendmessage function. windows calls a wh_callwndproc hook procedure before passing the message to the receiving window procedure, and calls the wh_callwndprocret hook procedure after the window procedure has processed the message. cbt: ... 下一页