+ -
当前位置:首页 → 问答吧 → dll 钩子失败

dll 钩子失败

时间:2011-12-26

来源:互联网

在dll 中有一个SetWindowshookEx
用一个普通程序加载dll ,一切正常,
用一个服务程序加载该dll ,dll 加强载成功,但是里面的全局钩子失败,怎么解决

作者: tiankong_bear   发布时间: 2011-12-26

正常的,服务程序与普通程序不在同一个桌面下,钩子与消息之类的都不能共用。
MSDN上的说法:The global hooks are a shared resource, and installing one affects all applications in the same desktop as the calling thread.

作者: wltg2001   发布时间: 2011-12-26

那么到底如何解决呢?

作者: tiankong_bear   发布时间: 2011-12-26