public static int[] GetProcessIds() { if (IsNt) { return(NtProcessManager.GetProcessIds()); } return(WinProcessManager.GetProcessIds()); }
/// <summary>Gets the IDs of all processes on the specified machine.</summary> /// <param name="machineName">The machine to examine.</param> /// <returns>An array of process IDs from the specified machine.</returns> public static int[] GetProcessIds(string machineName) { // Due to the lack of support for EnumModules() on coresysserver, we rely // on PerformanceCounters to get the ProcessIds for both remote desktop // and the local machine, unlike Desktop on which we rely on PCs only for // remote machines. return(IsRemoteMachine(machineName) ? NtProcessManager.GetProcessIds(machineName, true) : GetProcessIds()); }
// Due to the lack of support for EnumModules() on coresysserver. // We reply on PerformanceCounters to get the ProcessIds for both remote desktop // and the local machine unlike Desktop which reply on PCs only for remote machines. public static int[] GetProcessIds(string machineName) { if (IsRemoteMachine(machineName)) { return(NtProcessManager.GetProcessIds(machineName, true)); } else { return(GetProcessIds()); } }
public static int[] GetProcessIds(string machineName) { if (!IsRemoteMachine(machineName)) { return(GetProcessIds()); } if (!IsNt) { throw new PlatformNotSupportedException(SR.GetString("WinNTRequiredForRemote")); } return(NtProcessManager.GetProcessIds(machineName, true)); }
/// <summary>Gets the IDs of all processes on the current machine.</summary> public static int[] GetProcessIds() { return(NtProcessManager.GetProcessIds()); }