6、ll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]publicstaticexternintCallNextHookEx(intidHook,intnCode,Int32wParam,IntPtrlParam);//取得当前线程编号(线程钩子需要用到)[DllImport("kernel32")]publicstaticexternintGetCurrentThreadId();根据声明需要知道//定义钩子句柄 inthHook=0;//定义钩子的类型 int WH_KEYBOA