8错!
真不错!
真不错!
你不能让所有人都满意,因为不是所有人都是人!
刚试了
05下需要把hook编译为单独dll才能在调试状态下装载hook成功 (只有全局hook需要如此)
跨线程03也不会提示错误
而05会提示
想不通的是 为什么编译出来后 却可以成功 并没有调用单独的dll 如何ok
再查下,原来如此:
Question:
The project cannot be run in Visual Studio .NET 2005 in debug mode because of an exception error caused by calling the SetWindowsHookEx. Why? Is it a problem of .NET 2.0?
Answer:
The compiled release version works well so that can not be a .NET 2.0 problem. To workaround, you just need to uncheck the check box in the project properties that says: "Enable Visual Studio hosting process". In the menu: Project -> Project Properties... -> Debug -> Enable the Visual Studio hosting process.
实际上我勾选了宿主进程设置,缺还是调试装载hook失败, 再勾选非托管调试 终于ok啦
我的是03的
是不是不可以用呀