一百分相送。(在线等待,解决后立刻给分!)

20020501 2002-05-17 01:59:23
我在用keybd_event模拟键盘输入时,其它键盘都正常,但在模拟CTRL+ALT+DEL时却没有响应这是为什么?有什么方法可以解决吗?

下面是我的模拟过程:
keybd_event(17,MapVirtualKey(17,0),KEYEVENTF_EXTENDEDKEY,0);//CTRL按下
keybd_event(18,MapVirtualKey(18,0),KEYEVENTF_EXTENDEDKEY,0);//ALT按下
keybd_event(48,MapVirtualKey(48,0),KEYEVENTF_EXTENDEDKEY,0);//DEL按下
keybd_event(48,MapVirtualKey(48,0),KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);//DEL弹起
keybd_event(17,MapVirtualKey(17,0),KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);//CTRL弹起
keybd_event(18,MapVirtualKey(18,0),KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);//ALT弹起
...全文
101 13 打赏 收藏 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
wabc 2002-05-17
  • 打赏
  • 举报
回复
其实,你可以先分别检测Ctrl,alt,del,因为用户是不可能同时按下这三个键的,所以分别检测他们,并记录下来,一旦连续遇到这三个键,你就可以做你自己的事件了。
countrynew 2002-05-17
  • 打赏
  • 举报
回复
再请看:




http://www.csdn.net/expert/topic/402/402564.xml?temp=.3158228
蒋晟 2002-05-17
  • 打赏
  • 举报
回复
You can switch to the Winlogon Desktop and posy a message
// Winlogon uses hotkeys to trap Ctrl-Alt-Del...
PostMessage(HWND_BROADCAST, WM_HOTKEY, 0, MAKELONG(MOD_ALT | MOD_CONTROL, VK_DELETE));
and then switch back to your original desktop
蒋晟 2002-05-17
  • 打赏
  • 举报
回复
A normal keyboard hook (WH_KEYBOARD) can swallow keystrokes by returning TRUE in the hook procedure. However, this will not work for system keyboard events such as the ones you listed. For Windows NT version4.0 Service Pack 3 and later, you can install a low-level keyboard hook (WH_KEYBOARD_LL) that can detect these system keyboard events and eat all of them, except for CTRL+ALT+DEL. This exception is for security reasons.

Having said that, there are some ways to get around that exception, although Dr. GUI doesn't recommend it. In Windows NT, you can write a GINA (Graphical Identification 'N' Authentication) DLL to handle the security exception. (Do a full-text search on "GINA" in Online Help to learn all about it.) Dr. GUI's preference is to leave system keys such as CTRL+ALT+DEL alone.

In Windows 95/98 you can write a filter device driver. There is also a trick for Windows 95/98 that is described in the Microsoft Knowledge Base article Q154868, "HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95/98 in VB," located at http://support.microsoft.com/support/kb/articles/q154/8/68.asp. You can make a call to SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, lpvoid, 0) in order to disable the system keyboard events, including CTRL+ALT+DEL. Calling it again with the TRUE changed to FALSE will re-enable these key sequences.

The code for setting up the hooks will look like this:

hhookMouse = SetWindowsHookEx(WH_MOUSE,
(HOOKPROC) MouseFunc, hInstance, 0);

…which will cause the following hook function to be called:

LRESULT CALLBACK MouseFunc(int nCode, WPARAM wParam, LPARAM lParam)
{
if ( nCode >= 0 )
return 1;
else
return(CallNextHookEx(hhookMouse, nCode, wParam, lParam));
}

Don't forget to unhook your hook before you exit by calling the following:

UnhookWindowsHookEx(hhookMouse);

Now for the special part of your question-screen savers. Under Windows NT, screen savers run under a different desktop, where the hooks will have no effect. Once you're in the screen saver desktop, any mouse or keyboard activity will stop the screen saver. Under Windows 95/98, the screen saver is running in the same environment as the hooks. So, once the screen saver is running, the hooks will prevent keyboard or mouse activity from stopping the screen saver. Here's the interesting part: While the hooks will prevent mouse and keyboard activity from stopping the screen saver, they will not prevent such activity from delaying the screen saver from starting. That is, the screen saver will not start as long as you are clanging on the keyboard or monkeying with your mouse, even though the hooks are eating those events. This is true for Windows NT as well. So, to answer your question, the screen saver is noninterruptible with these hooks running under Windows 95/98, as long as you've taken care of the CTRL+ALT+DEL possibility.

countrynew 2002-05-17
  • 打赏
  • 举报
回复
请看



http://www.vchelp.net/article/submit/cad_key.htm
wabc 2002-05-17
  • 打赏
  • 举报
回复
不用写钩子了,这个组合键钩子是无法截获的。
如果你的确必须截获之,那么只有写一个Gina程序了
COOKER 2002-05-17
  • 打赏
  • 举报
回复
自己写个钩子试试.
20020501 2002-05-17
  • 打赏
  • 举报
回复
要怎么解决这个问题?
sammon 2002-05-17
  • 打赏
  • 举报
回复
被windows系统截获了吧
20020501 2002-05-17
  • 打赏
  • 举报
回复
无话可说,最后一次UP。
20020501 2002-05-17
  • 打赏
  • 举报
回复
upup
20020501 2002-05-17
  • 打赏
  • 举报
回复
各路大侠快出手啊。急!
sorry2000 2002-05-17
  • 打赏
  • 举报
回复
up
源码直接下载地址: https://pan.quark.cn/s/a4b39357ea24 【FAST FWR310 无线路由更新程序】是一个专门为FAST FWR310型号无线路由设备设计的固件升级方案,其主要目的在于改善设备的工作表现、纠正已知的系统缺陷或引入全新的操作特性。对无线路由器进行固件更新,实质上是指替换或升级其核心操作系统(即固件),从而使其运行状态得到进一步优化。 在无线路由器的持续使用阶段,用户有时会遭遇若干操作难题,例如网络连接的频繁中断、数据传输速率不高、无线信号覆盖范围有限等情况。针对此类挑战,通过安装新的固件(即刷机包),能够有效应对上述问题,因为新固件或许已经针对这些普遍存在的问题进行了优化处理。不仅如此,固件升级还能开启一些隐藏的功能选项,或者兼容第三方固件,例如OpenWRT,从而让用户能够进行更深入的系统自定义配置及管理。 FWR310 V5.0升级软件20160301是该刷机包的明确版本标识,显示出这是针对FAST FWR310路由器推出的第五代固件,并且发布日期为2016年3月1日。此版本的更新内容可能涵盖以下几个方面: 1. 运行效能的调优:借助于对路由器处理流程与内存分配的改善,能够加快数据交换速率,减少响应时间,从而全面提升网络的工作效能。 2. 安全防护的强化:更新内容中可能融入了对新兴网络安全风险的防御机制,用以保障用户的资料安全。 3. 互操作性的扩展:可能增强了与更多设备及协议的适配能力,比如最新的无线通信标准或设备连接模式。 4. 运行稳定性的提升:修复了可能引发路由器系统崩溃或意外重启的已知故障,延长了设备的稳定运行周期。 5. 新特性集成:或许增添了提升用户体验的功能,例如远程操作控制、家长监管功能、服务质...
内容概要:本文围绕基于混沌系统与DNA编码的彩色图像加密解密体系展开研究,旨在解决传统图像加密算法密钥空间小、抗干扰能力弱等问题。通过结合混沌系统的伪随机性与DNA编码的高维组合特性,构建了多层级、高复杂度的加密框架,实现了对彩色图像RGB三通道的混淆与扩散操作。研究重点包括加密算法的设计与实现、密钥敏感性分析以及抗噪声和抗裁剪性能的系统性测试。实验结果表明,该算法在面对高斯噪声、椒盐噪声及不同面积、位置的图像裁剪攻击时,仍能较好地恢复图像主体结构与核心信息,展现出优良的鲁棒性和实用性。文章还总结了当前研究的不足,并对未来优化方向进行了展望。; 适合人群:具备一定信息安全、图像处理或密码学基础知识的科研人员、研究生及工程技术人员。; 使用场景及目标:①用于高安全性需求下的图像传输与存储场景,如军事通信、医疗影像保护等;②为复合型图像加密技术的研究提供理论支持与实验依据,推动加密算法向高鲁棒性、强抗攻击能力方向发展; 阅读建议:建议读者结合文中提供的理论基础与实验分析,深入理解混沌与DNA编码的融合机制,并可通过复现实验进一步掌握算法细节与性能边界,重点关注抗干扰测试部分以评估其在实际应用中的可靠性。

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧