标签:class ntp rgba col span nbsp method dump ESS
void Main() { Process.GetCurrentProcess().Id.Dump(); getProcessOwnerName(Process.GetCurrentProcess().Id).Dump(); } public string getProcessOwnerName(int processId) { var processes = new System.Management.ManagementObjectSearcher("SELECT * FROM Win32_Process WHERE ProcessId = " + processId); foreach (System.Management.ManagementObject process in processes.Get()) { try { string[] OwnerInfo = new string[2]; process.InvokeMethod("GetOwner", (object[])OwnerInfo); return OwnerInfo[0]; } catch { return string.Empty; } } return string.Empty; }
标签:class ntp rgba col span nbsp method dump ESS
原文地址:https://www.cnblogs.com/nanfei/p/14004080.html