Thread: blocking ctrl + alt + delete

  1. #1
    Bug
    Guest

    Question blocking ctrl + alt + delete

    can somebody just tell me How can I block, ore disable task manager?

    thnx ppl's

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    You would need a keyboard library to handle it. I know that Allegro is capable of blocking ctrl-alt-delete. (Found that out the hard way.)

    If you're using Windows, post in the Windows forum. You would probably get a better response there.

  3. #3
    Bug
    Guest

    ?

    wheres that forum?

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: ?

    Originally posted by Bug
    wheres that forum?
    http://cboard.cprogramming.com/forum...p?s=&forumid=7



    In Win95 etc, you can use a certian system param to fool the os into thinking a screensaver is running (there's an example on this site, do a search). In WindowsNT/XP/2K it's rather difficult to do.

    Why would you need to do this?

  5. #5
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    ya....that can be done through api :

    SystemParametersInfo() with action SPI_SETSCREENSAVERRUNNING as first parameter.
    Chintan R Naik

  6. #6
    Bug
    Guest
    would the code be sometin' like dis:

    Code:
    HWND hwnd = FindWindow("Shell_traywnd", NULL);
    EnableWindow(hwnd, FALSE);
    ??

  7. #7
    Registered User Machewy's Avatar
    Join Date
    Apr 2003
    Posts
    42

    Thumbs up Common guys!

    I want to know too! Can someone please help us? I want to know how soooo bad!

    There have been a couble I have seen, but it only works in VC++. I don't mind to include <windows.h>, but I don't want to get near VC++. So..... I would love to have someone help us.

    I will practically bow down to anyone who answers!

    best regards,
    Machewy

  8. #8
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    Which OS are you using ??
    Chintan R Naik

  9. #9
    Bug
    Guest
    isn't possible that someone to make a code that will work in all Windows O/S ? :O

  10. #10
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    Following soln. will work in Windows95/98 :

    Call : SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, 0, NULL, 0);

  11. #11
    Registered User Machewy's Avatar
    Join Date
    Apr 2003
    Posts
    42
    Hmmm.... I don't get why this code won't work on my compiler. It is supposed to disable ctrl+alt+del :

    Code:
    procedure TurnSysKeysOff;
    var
    OldVal : LongInt;
    begin
    SystemParametersInfo (97, Word (True), @OldVal, 0)
    end;
    Is this only for VC++? Where do I get the header files to make this work?
    "All things come to an end"

  12. #12
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by Machewy
    Hmmm.... I don't get why this code won't work on my compiler. It is supposed to disable ctrl+alt+del :

    Code:
    procedure TurnSysKeysOff;
    var
    OldVal : LongInt;
    begin
    SystemParametersInfo (97, Word (True), @OldVal, 0)
    end;
    Is this only for VC++? Where do I get the header files to make this work?
    Dunno what the hell that is (pascal?) but if you can get that to compile on VC++ then I'll take my hat off to you!

    As previously stated, the SystemParametersInfo trick will only work on Win95/98 and maybe ME......Decent versions like 2000 & XP operate rather differently. The ctr-alt-del sequence is detected at a lower level and is rather difficult to override - at least I havent seen a simple way of doing it

  13. #13
    Registered User Machewy's Avatar
    Join Date
    Apr 2003
    Posts
    42
    LOL! Close! but its actually Delphi. I know that there is a way to convert this to C++, so I am trying to find a way. If anyone has a way to disable ctrl + alt + delete for all OSes please tell us.


    Best Regards,
    Machewy
    "All things come to an end"

  14. #14
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by Machewy
    LOL! Close! but its actually Delphi. I know that there is a way to convert this to C++, so I am trying to find a way.

    Already given on the thread!

    Following soln. will work in Windows95/98 :

    Call : SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, 0, NULL, 0);
    Originally posted by Machewy
    If anyone has a way to disable ctrl + alt + delete for all OSes please tell us.


    Best Regards,
    Machewy .
    There isnt a way

  15. #15
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    There isnt a way
    Ther is a way. In fact I can think of 2 ways to do this on an NT box. One hard. One very hard. Write a keyboard filter driver or replace the GINA DLL with one of your own. There is lots of information on this at msdn if you look for it. You could make a bypass DLL rather than a replacement but its still a lot of work for little reward.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to capture CTRL, SHIFT and ALT ?
    By goldenrock in forum C Programming
    Replies: 3
    Last Post: 11-06-2003, 01:20 AM
  2. Trapping Ctrl Alt Delete
    By emus21 in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 09-17-2003, 12:10 PM
  3. Ctrl + Alt +Delete
    By golfinguy4 in forum Windows Programming
    Replies: 4
    Last Post: 10-27-2002, 07:46 PM
  4. Problem need help
    By Srpurdy in forum C++ Programming
    Replies: 1
    Last Post: 07-24-2002, 12:45 PM
  5. memory management...
    By master5001 in forum Game Programming
    Replies: 24
    Last Post: 01-07-2002, 05:50 PM