Ron*_*ein 16 c# windows pinvoke pure-managed
我遇到了锁定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
Run Code Online (Sandbox Code Playgroud)
这个片段有一个纯粹的托管替代方案吗?即,没有P-Invoke.
| 归档时间: |
|
| 查看次数: |
7452 次 |
| 最近记录: |