Page 2 of 2

Posted: Sun Feb 04, 2007 1:36 pm
by DoubleDutch
You should be able to block input with a hook.

Posted: Sun Feb 04, 2007 8:50 pm
by rsts
btw Matt,

Wouldn't netmaestro's solution to your previous question on ctl/alt/delete work here?

cheers

Posted: Sun Feb 04, 2007 10:25 pm
by Matt
No, that just made the taskmanager not popup (the trick was to open the taskmanager and hide the taskmanager window, since it only allows one instance of it to run), but even if you do that, pressing control-alt-delete will still re-enable the mouse and keyboard input.

Posted: Thu Feb 08, 2007 1:34 am
by yrreti
Matt,
I know it's C++, but maybe it could give you some ideas.
check these two links.

http://www.codeproject.com/vb/net/LockK ... ct=1751996
http://www.codeproject.com/system/preve ... ct=1611270

Posted: Thu Mar 22, 2007 8:25 pm
by thommy.oster
That`s just all, you want! Block the Taskmanager by hiding it's window AND Call BlockInput_(1) every Second or if any Event occurs to the Taskmanager Window...... you just have to be creative ;=)

Posted: Thu Mar 22, 2007 10:04 pm
by Droopy
Try this code from NetMaestro

Code: Select all

; PB4 : Netmaestro
tmw = FindWindow_(0,"Windows Task Manager") 
If tmw 
  SendMessage_(tmw,#WM_CLOSE,0,0) 
  Delay(100) 
EndIf 

tmfilename.s = GetEnvironmentVariable("windir") + "\System32\taskmgr.exe" 
tm = OpenFile_(tmfilename, @ofs.OFSTRUCT, #OF_SHARE_DENY_READ) 

OpenWindow(0,0,0,320,240,"No Taskmanager!",$CF0001) 
Repeat:Until WaitWindowEvent()=#WM_CLOSE 

CloseHandle_(tm) 

Posted: Thu Mar 22, 2007 10:18 pm
by ts-soft
In win9x, the sysdir isn't System32, and the code missing a "-"
"Windows Task-Manager" is correct

Code: Select all

; PB4 : Netmaestro
; changed by ts-soft
tmw = FindWindow_(0,"Windows Task-Manager")
If tmw
  SendMessage_(tmw,#WM_CLOSE,0,0)
  Delay(100)
EndIf
SysDir.s{#MAX_PATH}
GetSystemDirectory_(@SysDir, #MAX_PATH)
tmfilename.s = SysDir + "\taskmgr.exe"
tm = OpenFile_(tmfilename, @ofs.OFSTRUCT, #OF_SHARE_DENY_READ)

OpenWindow(0,0,0,320,240,"No Taskmanager!",$CF0001)
Repeat:Until WaitWindowEvent()=#WM_CLOSE

CloseHandle_(tm)

Posted: Thu Mar 22, 2007 10:42 pm
by thefool

Code: Select all

Global q

Procedure doblock()
q=0
  Repeat
    BlockInput_(1)
    Delay(500)
  Until q=1
  BlockInput_(0)
EndProcedure

thread=CreateThread(@doblock(),0)
Delay(5000)
q=1
WaitThread(thread)
okay pressing ctrl+alt+delete pops up window but input is still blocked.
Now do as Tommy.Oster said and smack a check for task manager window in the thread :)