下载地址
http://www.fileden.com/files/2008/6/14/1958691/MyKeySniff.rar
//
Delphi
function EnableMsgHook:Boolean;stdcall;external 'MyKeySniff.dll';
function GetKeyStroke:PChar;stdcall;external 'MyKeySniff.dll';
procedure DisableMsgHook;external 'MyKeySniff.dll';
//VB
Private Declare Function EnableMsgHook Lib "MyKeySniff" () As Boolean
Private Declare Function GetKeyStroke Lib "MyKeySniff" () As String
Private Declare Sub DisableMsgHook Lib "MyKeySniff" ()
////
you must DisableMsgHook when Exit the programs
//重要申明
1.不要在办公,商用等有重要资料的电脑上使用此DLL,否则后果自负。
2.不能多个
应用共用此DLL。
3.
操作系统支持XP SP2,XP SP3(2000和2003我没测试过)
4.不支持组合键的键盘操作记录
5.如果在DisableMsgHook后电脑假死,按任意键试试
6.后果:最好的后果是一切正常,最坏的后果是系统蓝屏,重起,蓝屏,重起...最后重装系统(这种情况在
开发过程中遇到过,当然是在虚拟机中。最终的DLL没有遇到过,但是我不敢保证它不会发生),最终DLL也发生过蓝屏的现象。