Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I trap(hook) Ctrl-Alt-Del using VB?

Windows API

Can I trap(hook) Ctrl-Alt-Del using VB?

by  vanvb  Posted    (Edited  )
The short answer is: You can't.

Here is the reason taken from the windows logon screen:
"To log on, hold down the Ctrl and Alt keys, then press the Delete key. This key combination is recognized only by Windows, so pressing it before loggin on ensures that you are giving your password only to Windows."

While this is from the Logon screen, the same thing applies to trying to trap it after logon. This is because Windows also does things like changing passwords, etc. from the C-A-D screen that it doesn't want any other program to trap and impersonate.

Because this is a Windows security issue, there is no easy way to beat it. The only way seen around here so far is to write your own GINA. Here is some information regarding writing your own GINA from Strongm:
--------------------------------------
1) You really, really don't want to mess with MSGINA
2) You really, really don't want to write your own GINA, it is highly complex, and very low-level
3) You cannot write a GINA in VB

A quick look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/winlogon_and_gina.asp may be enough to convince you that you don't want to mess with this stuff...
--------------------------------------
There are a few threads that can be found on this site regarding this topic. A good one to look at because it explores a bit about the GINA is:
thread222-585565
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top