朱
朱浩刚
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我做的键盘hook程序每次截获的键盘按键都是成双的?还望那位高手指点。<br>(如键入a,记录按键的文件中却是aa.当我把记录的程序段去掉,着什么都没有)<br><br>处理键盘消息的函数:<br>function keyboardhook(icode:integer;wparam:wparam; lparam:lparam):lresult;stdcall;export;<br>begin<br> if icode<0 then<br> begin<br> result:=callnexthookex(nexthookproc,icode,wparam,lparam);<br> exit;<br> end;<br>assignfile(debugfile,afilename);<br>append(debugfile);<br>if getkeystate(vk_return)<0 then<br> begin<br> writeln(debugfile,'');<br> end<br>else<br> write(debugfile,char(wparam));<br> closefile(debugfile);<br> result:=0;<br>end;