那位高手知道hook键盘键盘不用DLL的方法,最好有源代码

解决方案 »

  1.   

    不用 DLL 好象是不可能的。
      

  2.   

    不用dll也不用ocx,直接在一个程序里完成。 还有个问题就是,如果用dll,在dll中发现有按键了如何实时通知应用程序
      

  3.   

    exe有导出表,可以用这个来实现类似dll的功能,但是有限制。只有有限几种钩子才好用。http://expert.csdn.net/Expert/topic/1189/1189496.xml?temp=.5576746
      

  4.   

    在msdn中找到了如下结果:
    Win32 HooksFilter functions in DLLsSystemwide filter functions must reside in a DLL. In Win16 it was possible (although not recommended) to install a systemwide hook to a filter function in an application. This does not work in Win32. Do not install systemwide filter functions that are not in DLLs, even if it does seem to work on a particular system. The journal hooks, WH_JOURNALRECORD and WH_JOURNALPLAYBACK, are exceptions to this rule. Because of the way Windows calls these hooks, their filter functions do not have to be in a DLL.
      

  5.   

    用日志HOOK就行了,还能监视鼠标,但只能监视而已。FUNCTION YourHookProc(nCode : Integer, wParam :WPARAM, lParam : LPARAM): LResult; StdCall; Export;......
    oldHook := SetWindowsHookEx(WH_JOURNALRECORD, @YourHookProc, hInstance, 0);
    ......在YourHookProc里随你便啦。
      

  6.   

    要用DLL来做,我有做好的代码。有偿提供,需要请联系[email protected]
      

  7.   

    不用DLL,直接写在一个文件里。用DLL多老土呀。8-)