【发布时间】:2010-11-18 18:45:48
【问题描述】:
我遇到了这个锁定 Windows 工作站的例子:
using System.Runtime.InteropServices;
...
[DllImport("user32.dll", SetLastError = true)]
static extern bool LockWorkStation();
...
if (!LockWorkStation())
throw new Win32Exception(Marshal.GetLastWin32Error()); // or any other thing
这个 sn-p 有一个纯托管的替代方案吗?即,没有 P-Invoke。
【问题讨论】:
标签: c# windows pinvoke pure-managed