CSDN的高人都用VB写的,看不懂,有能用C#解决的吗?禁用任务管理器,把他暂时搞不可用也可以

解决方案 »

  1.   

    用C++先写个hook.dll然后在C#里面调用
      

  2.   

    [DllImport("user32.dll",  SetLastError  =  true)]  
     public  static  extern  bool  RegisterHotKey(  
    IntPtr  hWnd, int  id,   int  fsModifiers,//alt  =  1,  none  =  0,  win  =  8;  Keys  virtualKey);  
     [DllImport("user32.dll",  SetLastError  =  true)]  
    public  static  extern  bool  UnregisterHotKey(IntPtr  hWnd,int  id);  
    http://topic.csdn.net/u/20090814/16/1865DAFB-AC19-4569-9D75-5C146D4A5B8E.html
      

  3.   


    禁用任务管理器,要安装全局钩子。需要调用hook.dll中的相应函数,当然这个dll是你自己写的。
      

  4.   

    建议你到百度上搜索“安装全局钩子”要想屏蔽本程序的按键,只需要直接调用hook相关的函数就可以但是要屏蔽所有程序的按键,必须将hook过程写到dll中,这样程序在加载dll时候,才能将dll映射到应用程序的地址空间(因为dll是共享的),禁用任务管理器就属于这一类。