Locking Screen

D

Daniel Diehl

Good morning C# world,
I have developed an USB Authentication-Software wich wants to lock the
screen when the USB stick is unplugged and reactivate the desktop on USB
Plug.

Now I am sitting on the locking problem. I think there a two possible ways
to do this.
a) Disabling ALT-TAB, ALT-F4 etc.
b) Locking the screen for everything

I don't find any useful stuff for locking the screen. Can somebody give me
a hint or example how I can LOCK the Screen? Is there a way ? and
reactivate it also by the application.

Thanks a lot for your hints and a happy XMAS to everybody.
Daniel
 
N

Nicholas Paldino [.NET/C# MVP]

Daniel,

The easiest way I think would be to call the LockWorkstation function
through the P/Invoke layer. This will lock the workstation. However, the
user will have to log back into the workstation in order to unlock it.
However, this shouldn't be a problem, because you will need to create a
custom GINA dll to handle the login screen. This is needed because a login
should not be allowed if the user doesn't have the USB dongle, right?

Hope this helps.
 
C

CyberOppy

Is there some way to intercept/handle all key and mouse events? (That is
just a blind guess) - Maybe with a windows service....????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top