本文介绍了Windows 7,SetWindowsHookEx,超过最大允许时间后停止调用回调proc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用SetWindowsHookEx设置低级鼠标挂钩时,我发现Vista和Windows 7 RC在操作上存在差异:

如果出于某种原因-CPU使用率出现随机峰值,无论-我注册了鼠标挂钩回调proc花费的时间超过了允许的最长时间,在Vista上,我的挂钩函数仍会被再次调用,在Windows 7 RC上,我的回调函数似乎再也不会被调用.

是否可以确认这是Windows 7的新预期行为?

谢谢

Ross

When setting a low level mouse hook using SetWindowsHookEx I am seeing a difference in operation between Vista and Windows 7 RC:

If, for whatever reason - random peak in CPU usage, whatever - my registered mouse hook callback proc takes longer than the maximum allowed time, on Vista my hook function will still get called again, on Windows 7 RC my callback appears never to be called again.

Can someone confirm that this is new, expected behavior for Windows 7?

Thanks

Ross

推荐答案


这篇关于Windows 7,SetWindowsHookEx,超过最大允许时间后停止调用回调proc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 18:08