SetCursorPos 和 GetCursorPos 在登录屏幕上不起作用? [英] SetCursorPos and GetCursorPos not working at login screen?

查看:55
本文介绍了SetCursorPos 和 GetCursorPos 在登录屏幕上不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 Windows Vista/7 登录屏幕上使用 SetCursorPos 时,返回了 true,这让我一开始以为它在工作.但是,当我调用 GetCursorPos 时,它给了我:

When I attempt to use SetCursorPos at the Windows Vista/7 login screen, true is returned which at first made me think it was working. However, when I call GetCursorPos it gives me:

-858993460,-858993460

有什么想法吗?这是安全功能"还是我使用不当?该代码在非登录(即普通)桌面上运行良好.

Any thoughts why? Is this a "security feature" or am I using it incorrectly? The code works fine on non-login (i.e. normal) desktop.

推荐答案

替代解决方案: 可以(但非常棘手)使用 mouse_event(其中 在登录屏幕上工作)而不是 SetCursorPos.我现在没有时间发布代码,但如果被问到我可能会更新这个答案...

Alternative solution: It is possible (but very tricky) to use mouse_event (which does work at login screen) instead of SetCursorPos. I don't have time to post code now, but if asked I may update this answer...

这篇关于SetCursorPos 和 GetCursorPos 在登录屏幕上不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆