BlockInput AND CTRL+ALT+DEL

2019-09-24 08:14发布

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
  • 标签: delphi input
    1条回答
    Lonely孤独者°
    2楼-- · 2019-09-24 08:49

    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.

    查看更多
    登录 后发表回答