Blockinput_() problem

Windows specific forum
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Blockinput_() problem

Post by Matt »

If I use Blockinput_(1) to disable the mouse and keyboard, the user will still be able to gain back control over the mouse and keyboard by pressing Control-Alt-Delete... is there anyway I can stop that?
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Not on XP or 2000 without any "hacks" I think...
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

this is good.
If Control-Alt-Delete doesn't work, i would put power off, put on and recycle the software :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Post by Matt »

We'll actually I need it. I am making a 'vnc' type program, where you can control a client's computer, and one of the options I need is to lock all mouse and keyboard input.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

then remove the keyboard :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Post by Matt »

oh come on...
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

If the client wants their computer controlled, they will usually agree not to use the keyboard. The vnc programs I've used didn't lock me out of the computer if I wanted in - and that's pretty much the way I feel it should be.

Why do you feel they should be locked out of ctl/alt/delete?

cheers
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

only bloody virus-programmers need such crap.
oh... and have a nice day.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> only bloody virus-programmers need such crap

Let's not judge, FFS. Anyone can do what they want for an app. If he wants
to block input for his app, who are we to tell him no? Are we his daddy? He
never said the app was for public use -- it might be a private custom app for
all we know. Let's just stop with the judging over such a small thing. It's not
like he asked how to delete the Windows folder! The BlockInput API is made
by Microsoft for legitimate uses, so let him use it how he wants. Sheesh.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

yo ok, mate, you're right.

...it's just that the tiny hairs in my neck rise when I hear such questions...
oh... and have a nice day.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

I know what you mean, but he's using a normal documented API call, so it's
no big deal, in my opinion. I didn't mean to sound harsh but I hate it when
someone doesn't get help just because others assume it's for malicious intent.

Now, if he had asked how to use DeleteFile_() with GetSystemDirectory_() then
of course we would be very hesitant to help, but blocking input isn't such a big
problem. As the documentation says: if the process that made the block is killed,
then full normal input returns automatically, so all the user has to do is press
CTRL+ALT+DEL and kill the process, and bang, all systems normal again.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

correct. that's the reason why Ctrl-Alt-Del is not blockable,
but that was what he was asking for.

not simple input-blocking, but blocking Ctrl-Alt-Del.....
oh... and have a nice day.
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Post by Matt »

I am making a vnc-type program, but not exactly. It's for personal use in my house over my computers really. What I needed was something to stop all input on the users side, so they would not be able to interfere with anything that the controller person is doing.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Well, if it's your kids, you ought to be able to tell them to say off while you do your thing.

If it's your wife, you might have to try "honey, would you please. . ." :D

I still see no valid case for trapping ctl/alt/delete - but it's your place, so the remove the keyboard ought to be a valid option too. :D

good luck
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Post by Matt »

thanks

I plan on just leaving it then, blockinput will work for me I guess,

thanks everyone.

Matt
Post Reply