偶写了个全局钩子dll,用一个exe调用,效果正常。
现在在一个service的dispatcher里开一个thread做这个exe做的事情,结果就无效果了看了一下,好像是Redirect IAT的时候扫描不到之类。
现在在一个service的dispatcher里开一个thread做这个exe做的事情,结果就无效果了看了一下,好像是Redirect IAT的时候扫描不到之类。
解决方案 »
- 【讨论1】COM的前世今生,未来展望
- 散尽所有分求小波理论边缘提取方面的资料
- 简单问题,进来看看吧
- 如何实现调用另外一个exe程序的具体的一个菜单?没有源代码,有办法做到吗?
- 向高手求教, 我使用CreateThread()函数,编译出现下面错误,,请高手讲解啊..........
- [版务]看到基础类的办法不错,在我版试行————关于FAQFAQ、精华的审核方法
- 如何利用vc建立图层???急需
- 如何把listctrl的数据插入在后面,我用InsertItem,总是往前面插入,谢谢
- installshield内部是怎样安装快捷方式的?代码中快捷方式的路径如何获取和更改?
- Windows计算器制作全过程
- 关于CStatic的问题,我想要在程序中给静态文本控件中的添加使其中的Font无效(变成灰色的反转字体)的代码应该怎样做?
- 关于读文本的问题!谢谢!
A desktop consists of a logical display surface and a set of user objects: windows, menus, and hooks. Threads are also associated with desktops. (See the SetThreadDesktop and GetThreadDesktop functions in the Platform SDK documentation.) If a thread associated with one desktop attempts to send a message to a window created on another desktop, the system fails the call. This is the security mechanism at work. Likewise, a thread can't install a hook on a thread that's part of another desktop.我估计就是这个原因。
SwitchDesktop(hdesk);
HDESK hdeskUser = OpenDesktop("Default",0,FALSE,MAXIMUM_ALLOWED);
SetThreadDesktop(hdeskUser); 或者,在使用CreateService创建服务时dwServiceType参数设为SERVICE_INTERACTIVE_PROCESS