实在不好意思,老问题了,搜了一下以前的帖子,还是没弄懂
我是想拦截修改别的进程窗口的消息。
我开始写了个exe,但是没有拦截到,后来查MSDN说要放到dll中,我理解能力差,没弄明白
是不是我要再写一个class,然后把HookProc()(SetWindowsHookEx()的第2个参数)写到新的class中,再回到原来的class的main()中new Thread(),然后....(然后怎么做?)

解决方案 »

  1.   

    在MSDN的SetWindowsHookEx()的介绍里说要放到DLL,但是又在C#下的SetWindowsHookEx()看到这个:(打击我了)
    You cannot implement global hooks in Microsoft .NET Framework. To install a global hook, a hook must have a native dynamic-link library (DLL) export to inject itself in another process that requires a valid, consistent function to call into. This requires a DLL export, which .NET Framework does not support. Managed code has no concept of a consistent value for a function pointer because these function pointers are proxies that are built dynamically.================================================================
    此帖通过csdn小助手回复。
        CSDN小助手是使用vb.net编写的CSDN论坛脱机“外挂”,她能够在
    脱离IE的情况下使用Csdn论坛。程序只加载最核心的数据,所以显示更
    快,产生的流量更小。    下载地址:http://qqwwee.com/csdn.rar
    ================================================================
      

  2.   

    如果只是键盘hook的话,通过低级键盘钩子是可以做到的.
    http://blog.csdn.net/hatita/
      

  3.   

    恩,谢谢
    你能不能帖上来呢
    你的Blog太慢了
    我等了10几分钟了,还没打开