Results 1 to 1 of 1
  1. #1
    idrcelab
    idrcelab is offline
    Guest
    Join Date
    2013 Sep
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    Lightbulb Disable Ctrl+Alt+Del Keys with Scancode Mapping

    This snippet will disable ctrl+alt+del keys by modifying the registry scancode mapping, this code will works on xp-w8, you have to restart computer to make this works.

    Code:
    procedure TfrmMain.DisableCtrAltDel(boolState: Boolean);
    {
      Author : Teofilus
      e-mail : delphifocus[at]gmail[dot]com
      Compiler : Borland Delphi 7 Enterprise
      Description : Disable [ctrl]+[alt]+[del] keys - works on XP/Vista/W7
    }
    var
      SystemReg: TRegistry;       // Add Registry unit to uses
      Data: Array[1..48] of Byte; // Static Array 48 byte
      i: Byte;
    begin
      try
        { Initialize "Scan Code" Value with $00}
        for i := 1 to 48 do
          data[i] := $00;
    
        { Change certain byte }
        data[ 9] := $09;
        data[15] := $5B;
        data[16] := $E0;
        data[19] := $5C;
        data[20] := $E0;
        data[23] := $5D;
        data[24] := $E0;
        data[27] := $44;
        data[31] := $1D;
        data[35] := $38;
        data[39] := $1D;
        data[40] := $E0;
        data[43] := $38;
        data[44] := $E0;
        { End of "Scan Code" Value }
    
        try
          SystemReg := TRegistry.Create;
          with SystemReg do
          begin
            RootKey := HKEY_LOCAL_MACHINE;
            OpenKey('\System\CurrentControlSet\Control\Keyboard Layout', True);
            { Decide what to do - disable/enable }
            if boolState then
              // Modify the Keyboard Layout Scancode Map
              WriteBinaryData('Scancode Map', Data, SizeOf(Data))
            else
              DeleteValue('Scancode Map');
            // Inform the user to restart Windows
            MessageDlg('Restart Windows in order the changes to take effect!',
              mtInformation, [mbOK], 0);
            CloseKey;
          end;
        finally
          SystemReg.Free;
        end;
      except
        MessageDlg('Error occurred while trying to disable ctrl+alt+del and Task Manager',
          mtWarning, [mbOK],0 );
      end;
    end;

Similar Threads

  1. [Info] Sorteio 50 keys Dota 2 e mais algumas coisinhas
    By rampag3 in forum Português
    Replies: 0
    Last Post: 2012-09-17, 06:28 PM
  2. Disable xtrap
    By Lucas in forum Trash Bin
    Replies: 2
    Last Post: 2012-01-28, 03:41 PM
  3. [Tool] How to disable Xtrap?
    By alecz in forum Aika Online
    Replies: 3
    Last Post: 2012-01-21, 06:49 AM
  4. [Help] Can't send keys to game via extern program
    By d4rk_sasuke in forum Martial Empires
    Replies: 2
    Last Post: 2012-01-11, 04:17 PM
  5. [Bot] Rift Turbo Keys Spammer with Anti AFK
    By Grooguz in forum Rift Bots, Hacks, Cheats
    Replies: 0
    Last Post: 2011-03-26, 01:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •