我想锁定当前操作用户的访问,就好像用户一样
点击开始→指向关机→点击锁定
如何在 C# 中做到这一点?
最佳答案
http://jessn.blogspot.com/2009/05/lock-my-computer-programatically-in-c.html这篇文章说得最好:
A much better design that isn't hard coded to your windows system paths, etc:
using System.Runtime.InteropServices;
[DllImport("user32.dll")] public static extern void LockWorkStation();
Then just call LockWorkStation();
关于c# - 如何锁定并强制用户重新输入 Windows 密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14775054/