[C#]如何取得Process的Owner
if (processObj == null)
throw new ArgumentException("Process not exists!");
var argList = new string[2];
int returnVal = Convert.ToInt32(processObj.InvokeMethod("GetOwner", argList));
if (returnVal == 0)
{
return string.Join(@"\", argList.Reverse().ToArray());
}
return null;
}</pre></div>
if (processObj == null)
throw new ArgumentException("Process not exists!");
var argList = new string[2];
int returnVal = Convert.ToInt32(processObj.InvokeMethod("GetOwner", argList));
if (returnVal == 0)
{
return string.Join(@"\", argList.Reverse().ToArray());
}
return null;
}
}