Lock Windows workstation programmatically in C#

后端 未结 1 866
猫巷女王i
猫巷女王i 2020-12-01 14:15

I ran into this example for locking Windows workstation:

using System.Runtime.InteropServices;
...
[DllImport(\"user32.dll\", SetLastError = true)]
static ex         


        
相关标签:
1条回答
  • 2020-12-01 15:06

    No there is not. This is the best way to achieve this action.

    Even if it was provided in the BCL, its implementation would almost certainly be identical to your sample. It's not something the CLR would natively implement.

    0 讨论(0)
提交回复
热议问题