Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
527 views
in Technique[技术] by (71.8m points)

delphi - BlockInput AND CTRL+ALT+DEL

Is there any way to block CTRL+ALT+DEL too when using BlockInput(true); in Delphi? I've found a function SystemParametersInfo(97,Word(True),@OldValue,0); but it doesn't work on XP.

I need this for my classroom in the university to temporarily "BAN" students, who are trying to cheat computerized tests.

Edit:

Well, ok. The result of while true do BlockInput(true) + NoClose + NoLogoff, DisableTaskMgr + DisableLockWorkstation + DisableChangePassword is partly acceptable. With this banned user can only press "Cancel" on the Security screen, and get an error, if he/she try to press a CTRL + SHIFT + ESC on this. But this is not very clean way to do this, I think, so the question about blocking all input is still active.

Suggested solutions:

Key remapping - requires reboot, remapped keys not working properly Gina DLL replacement - requires some major knowledge in C++ to have needed functionality, please provide more info or a link to a working sample KB Driver replacement - may not work with some keyboards and Windows is trying to replace it back after reboot Nothing to do with this - not actual truth because of some apps, which can do this without a reboot or gina replacement See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

No. Ctrl+Alt+Del is the Secure Attention Sequence. It's called Secure because the OS always handles it internally. Applications cannot override that.

In your case, you don't need to block it anyway. It's not a sequence you type in by accident. Therefore, it's sufficient to detect it. E.g. it would be the only way in which your app would lose focus. So, tell your students not to do it, and fail the test if they still try.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...