public static int[] GetProcessIds()
 {
     if (IsNt)
     {
         return(NtProcessManager.GetProcessIds());
     }
     return(WinProcessManager.GetProcessIds());
 }
 public static ModuleInfo[] GetModuleInfos(int processId)
 {
     if (IsNt)
     {
         return(NtProcessManager.GetModuleInfos(processId));
     }
     return(WinProcessManager.GetModuleInfos(processId));
 }
        public static ProcessInfo[] GetProcessInfos(string machineName)
        {
            bool isRemoteMachine = IsRemoteMachine(machineName);

            if (IsNt)
            {
                if (!isRemoteMachine && (Environment.OSVersion.Version.Major >= 5))
                {
                    return(NtProcessInfoHelper.GetProcessInfos());
                }
                return(NtProcessManager.GetProcessInfos(machineName, isRemoteMachine));
            }
            if (isRemoteMachine)
            {
                throw new PlatformNotSupportedException(SR.GetString("WinNTRequiredForRemote"));
            }
            return(WinProcessManager.GetProcessInfos());
        }