Lock the system

J

Jochen Berger

Moin!

Maybe I'm blind, but I couldn't find it in the documentation. How do I
lock the system / machine? I want to lock it, as if the user would've
pressed Ctrl+Alt+Del, and then selected "Lock computer".

TIA

Jochen
 
N

Nicholas Paldino [.NET/C# MVP]

Jochen,

In order to do this, you will have to call the LockWorkStation API
function through the P/Invoke layer. The declaration should be on
http://www.pinvoke.net.

Hope this helps.
 

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