oribeiro Posted October 10, 2019 Report Share Posted October 10, 2019 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; Quote Link to comment Share on other sites More sharing options...
oribeiro Posted October 11, 2019 Author Report Share Posted October 11, 2019 A função SetTaskManager(.F.) nativa do FHW não funciona no Windows Server 2008 64 bits. Quote Link to comment Share on other sites More sharing options...
Marca Posted October 11, 2019 Report Share Posted October 11, 2019 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" Quote Link to comment Share on other sites More sharing options...
oribeiro Posted October 11, 2019 Author Report Share Posted October 11, 2019 live:oscar.ribeiro_1 oscar.ribeiro@outlook.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.