Article View: borland.public.cppbuilder.nativeapi
Article #14368Re: Lowlevelkeyboard hook question ?
From: Remy Lebeau (TeamB)
Date: Mon, 18 Aug 2003 17:34
Date: Mon, 18 Aug 2003 17:34
40 lines
2702 bytes
2702 bytes
"Martin C" <martinc@aol.com> wrote in message
news:3f3f73be@newsgroups.borland.com...
> So far the ALT+TAB and the ALT+ESCAPE are disabled
> while the CONTROL + ALT + DELETE disable line is not
> working, in other words if I pressed ctrl+alt+delete the system
> will still show the task manager, can some one help me please
> and tell me what I am missing here in this code? or what I am
> doing wrong?
You are not doing anything wrong. Under WinNT/2K/XP, you simply cannot
disable CTRL-ALT-DEL using a keyboard hook, that's all. The OS won't allow
it. What you need to do is write a replacement GINA.DLL instead, since the
GINA system is what is involved by CRL-ALT-DEL to switch over to the
WinLogon desktop, which then gives you the option of displaying the task
manager, locking the workstation, etc. Go to MSDN and look up GINA for more
information. Also have a look at this article:
http://msdn.microsoft.com/msdnmag/issues/02/09/CQA/default.aspx
(look at the second question)
> Another question, the low level keyboard hook is good for
> Windows NT4 SP3 and up (based on Microsoft documentation),
> so what is the alternative function to achieve the my task
> (disabling some key combinations) in Windows 95, 98...
There is no hook for that. Instead, use the SystemParametersInfo() function
with the SPI_SCREENSAVERRUNNING flag to "trick" the OS into thinking the
screen saver is currently running. As a side effect, the OS disables system
key combos such as CTRL-ESC, ALT-TAB, CTRL-ALT-DEL, etc.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/03
Technical Details
Message-ID:
<3f410c98$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f3f73be@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8e2edf04fa0c971c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-18 10:38:58 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f3f73be@newsgroups.borland.com> Subject: Re: Lowlevelkeyboard hook question ? Date: Mon, 18 Aug 2003 10:34:38 -0700 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f410c98$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061227672 207.175.226.26 (18 Aug 2003 10:27:52 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail