Jump to content
Fivewin Brasil

Bloquear acesso ao Gerenciador de Tarefas com Ctrl+Shift+Esc


oribeiro

Recommended Posts

Pessoal, 

Tem como bloquear o acesso do usuário de terminal server ao gerenciador de tarefas usando (Ctrl+Shift+Esc) ?

Achei uma função para isso em Delphi:

http://www.planetadelphi.com.br/dica/7145/-bloquear-o-gerenciador-de-tarefas-(ctrl+alt+del-e-ctrl+shift+esc)-

Alguém consegue fazer isso dentro do xHarbour?

function BlockInput(ABlockInput: boolean): Boolean; stdcall; external 'USER32.DLL';

procedure TravaGT(SimNao: boolean);
var
reg: TRegistry;
begin

try
reg := TRegistry.Create;
  with reg do begin
  RootKey := HKEY_CURRENT_USER;
  OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem',true); //se não existir, é criada
    case SimNao of
    true:  WriteInteger('DisableTaskMgr',1);
    false: WriteInteger('DisableTaskMgr',0) ;
    end;
  closeKey;
  end;
finally
reg.free;
end;

end;

 

Link to comment
Share on other sites

Oscar. Qual seu Skype ?

Segue rotina

 

*----------------------------------------------------------------------------
* lStat ->  .T. Trava
* lStat ->  .F. Destrava
Function TravaDestravaTeclado( lStat )  //  Bloqueio/Desbloqueio do Teclado
*----------------------------------------------------------------------------
   BlockInput( lStat )
RETURN

// Travar e destravar teclado
DLL32 FUNCTION BlockInput( lTrava AS BOOL ) AS BOOL PASCAL LIB "User32.DLL"
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...