Recent

Author Topic: Overload procedure  (Read 7087 times)

supermew

  • New Member
  • *
  • Posts: 10
Re: Overload procedure
« Reply #15 on: August 25, 2016, 08:08:13 pm »
I just want to have a fullscreen window, that prevents the user from using the computer

Fungus

  • Sr. Member
  • ****
  • Posts: 353
Re: Overload procedure
« Reply #16 on: August 25, 2016, 08:10:33 pm »
I just want to have a fullscreen window, that prevents the user from using the computer

Let me guess.. And in that window you would loop this: https://www.youtube.com/watch?v=dQw4w9WgXcQ ???

supermew

  • New Member
  • *
  • Posts: 10
Re: Overload procedure
« Reply #17 on: August 25, 2016, 08:11:56 pm »
No :D
it should only show a blue screen.
Later the application should be launched and closed remotly.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Overload procedure
« Reply #18 on: August 25, 2016, 08:24:32 pm »
I just want to have a fullscreen window, that prevents the user from using the computer

That sounds you're experimenting to create a computer virus.
 ;D

supermew

  • New Member
  • *
  • Posts: 10
Re: Overload procedure
« Reply #19 on: August 25, 2016, 08:27:27 pm »
No just for a schoolproject

Fungus

  • Sr. Member
  • ****
  • Posts: 353
Re: Overload procedure
« Reply #20 on: August 25, 2016, 08:27:47 pm »
No :D
it should only show a blue screen.
Later the application should be launched and closed remotly.

On Windows the behaviour would require a driver to be installed - this would alone require a lot of skills. On Linux it might be possible, but... Sounds like a stupid idea, good luck m8!

supermew

  • New Member
  • *
  • Posts: 10
Re: Overload procedure
« Reply #21 on: August 25, 2016, 08:54:28 pm »
Can't I just disable the keyboard?

balazsszekely

  • Guest
Re: Overload procedure
« Reply #22 on: August 25, 2016, 09:35:34 pm »
This will block the keyboard and mouse except Ctr+Alt+Del. Actually it is possible to disable the Ctr+Alt+Del key sequence too, but then you become the evil kid, and we don't want that.  :D
Code: Pascal  [Select][+][-]
  1. uses windows, dynlibs;
  2.  
  3. procedure DisableTheKeyboardAndMouse(const ADisable: Boolean);
  4. type
  5.   TBlockInput = function(Block: BOOL): BOOL; stdcall;
  6. var
  7.   LibHandle: THandle;
  8.   FarProc: TFarProc;
  9.   BlockInput: TBlockInput;
  10. begin
  11.   LibHandle := LoadLibrary(PChar('User32.dll'));
  12.   if LibHandle <> 0 then
  13.   begin
  14.     FarProc := GetProcAddress(LibHandle, PChar('BlockInput'));
  15.     if FarProc <> nil then
  16.     begin
  17.       BlockInput := TBlockInput(FarProc);
  18.       BlockInput(ADisable);
  19.     end;
  20.     FreeLibrary(LibHandle);
  21.   end;
  22. end;
  23.  
  24. procedure TForm1.Button1Click(Sender: TObject);
  25. begin
  26.   DisableTheKeyboardAndMouse(True);
  27.   Sleep(10000);//you have 10 sec to test it
  28.   DisableTheKeyboardAndMouse(False);
  29. end;

hy

  • Full Member
  • ***
  • Posts: 221
Re: Overload procedure
« Reply #23 on: August 25, 2016, 10:01:41 pm »
Why not just remove keyboard and mouse?
Maybe, I just don't get it.
_____
***hy
OS: debian sid(64bit)  [fpc 3.20] Lazarus 2.0.12

balazsszekely

  • Guest
Re: Overload procedure
« Reply #24 on: August 25, 2016, 10:10:10 pm »
Quote
@hy
Why not just remove keyboard and mouse?
Maybe, I just don't get it.
I believe he wants to pull a trick on his classmates(teacher perhaps?). After he install/run the program on several computers(LAN), he can remotely block/unblock the computer. It's like a client/server application where the client has the ability to do nasty stuff, and the server is controlled by the OP.

 

TinyPortal © 2005-2018