Link to home
Start Free TrialLog in
Avatar of lmclaren
lmclaren

asked on

How do I do a GINA hook function with Delphi

I need to totaly disable CTL-ALT-DEL under Window XP, 2000 and NT.
I have done a lot of research and it looks like the best method is to hook the GINA SAS and eat the keys, I have C++ code that seems to work and need some help to do similar with Delphi.
It must not bring up any dialog boxes when CTL-ALT-DEL is pressed and I need to enable and disable it from a NT service.


regards

Lee

Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

ASKER CERTIFIED SOLUTION
Avatar of knightmad
knightmad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DaFox
DaFox

Hi Lee.

For the latest version of WinWlx take a look at the author's page at http://www.bendlins.de/nico/delphi/ .

Markus

PS: There are 2 more possibilities to disable "system hotkeys":
1. custom keyboard driver
2. GP (group policy)
Avatar of lmclaren

ASKER

Ferruccio68

From the link posted by Ferruccio68:
"I should also note that this will not intercept the SAS (secure attention sequence : ctrl-alt-del), nor the GINA code which is used to logon and/or authenticate passwords.  There isn't a lot you can do to stop ctrl-alt-del besides writing your own GINA DLL as well and dealing with it there, if I remember correctly.  This applies to windows nt/2000/xp only, not to 9x versions, I don't know how they operate in regard to ctrl-alt-del."

So this is a no go.


Knightmad
Looks like the link posted meets my stated requirements, I am not sure that I am going to be able to use the method though as the screen flashes when the sas is used.
I have found some C++ code that injects a dll into GINA and works very nicely with no limitations that I can find, For my basic skill It would take me a long time to convert to Delphi but is a good option.

DaFox
I have previously modified and used a keyboard hook, works fine all the way up to XP where it has a problem with suspend mode. I have been looking into my options before choosing which way I will go on this.


Conclusion:
Knightmad has answered the question so gets the points but I am not sure I will go with a straight GINA hook, If I go with GINA I will inject a dll for the added benifits. I will first have a looks at the XP DDK to see if I rewrite the original keyboard hook I modified.

regards

Lee

 Wasn't my answer good enough to deserve an "A" grade? To give "A" grade make Experts happy and don't cost a thing.
Hi Knightmad,
I haven't graded many questions and looked to the faq for guidance. I am sorry if my grade was too harsh. I don't know how to change the grade now the question is closed. I will try to make it up to you.


Lee.
The common behaviour is: "A" for helpful, working answers, "B" for poor incomplete answers and C never, better to keep the thead open than give a "C" grade.

About to change the grade, if you really want to change, leave a post in https://www.experts-exchange.com/Community_Support/ asking for this.
Done, Q_20736749
Thank you lmaclaren. Sometimes questioneer doesn't know that the grade is almost more important than the points itself : ) Thank you so much