2020年11月19日

C# 命令行参数分割

摘要: [DllImport("shell32.dll", SetLastError = true)] private static extern IntPtr CommandLineToArgvW([MarshalAs(UnmanagedType.LPWStr)] string lpCmdLine, ou 阅读全文

posted @ 2020-11-19 15:29 空明流光 阅读(346) 评论(0) 推荐(0)

C# 获取所有已登录系统的用户名

摘要: [DllImport("wtsapi32.dll")] static extern IntPtr WTSOpenServer([MarshalAs(UnmanagedType.LPStr)] string pServerName); [DllImport("wtsapi32.dll")] stati 阅读全文

posted @ 2020-11-19 15:02 空明流光 阅读(1446) 评论(0) 推荐(0)

C#获取进程用户名

摘要: void Main() { Process.GetCurrentProcess().Id.Dump(); getProcessOwnerName(Process.GetCurrentProcess().Id).Dump(); } public string getProcessOwnerName(i 阅读全文

posted @ 2020-11-19 10:39 空明流光 阅读(833) 评论(0) 推荐(0)

导航