NullReferenceException when call CallNextHookEx in multi-Thread app

SetWindowsHookEx(WH_MOUSE_LL, mousehookDelegate, intptr, 0)

在这里用了一个实例代理没有用匿名,

HookProc mousehookDelegate = new HookProc(MouseHookProc);

SetWindowsHookEx(WH_MOUSE_LL, MouseHookProc , intptr, 0); 

然后在Control.Invoke() 调用。 

 

貌似运行了好一会也没有碰到异常了 

posted on 2012-03-09 17:16  无法显示此网页  阅读(273)  评论(0编辑  收藏  举报

导航