다음을 통해 공유


Process 클래스

정의

로컬 및 원격 프로세스에 대한 액세스를 제공하고 로컬 시스템 프로세스를 시작하고 중지할 수 있습니다.

public ref class Process : System::ComponentModel::Component, IDisposable
public ref class Process : IDisposable
public ref class Process : System::ComponentModel::Component
public class Process : System.ComponentModel.Component, IDisposable
public class Process : IDisposable
public class Process : System.ComponentModel.Component
type Process = class
    inherit Component
    interface IDisposable
type Process = class
    interface IDisposable
type Process = class
    inherit Component
Public Class Process
Inherits Component
Implements IDisposable
Public Class Process
Implements IDisposable
Public Class Process
Inherits Component
상속
상속
Process
구현

예제

다음 예제에서는 클래스의 인스턴스를 Process 사용하여 프로세스를 시작합니다.

using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
{
    class MyProcess
    {
        public static void Main()
        {
            try
            {
                using (Process myProcess = new Process())
                {
                    myProcess.StartInfo.UseShellExecute = false;
                    // You can start any process, HelloWorld is a do-nothing example.
                    myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
                    myProcess.StartInfo.CreateNoWindow = true;
                    myProcess.Start();
                    // This code assumes the process you are starting will terminate itself.
                    // Given that it is started without a window so you cannot terminate it
                    // on the desktop, it must terminate itself or you can do it programmatically
                    // from this application using the Kill method.
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
    }
}
open System.Diagnostics

try
    use myProcess = new Process()
    myProcess.StartInfo.UseShellExecute <- false
    // You can start any process, HelloWorld is a do-nothing example.
    myProcess.StartInfo.FileName <- @"C:\HelloWorld.exe"
    myProcess.StartInfo.CreateNoWindow <- true
    myProcess.Start() |> ignore
// This code assumes the process you are starting will terminate itself.
// Given that it is started without a window so you cannot terminate it
// on the desktop, it must terminate itself or you can do it programmatically
// from this application using the Kill method.
with e ->
    printfn $"{e.Message}"
Imports System.Diagnostics
Imports System.ComponentModel

Namespace MyProcessSample
    Class MyProcess
        Public Shared Sub Main()
            Try
                Using myProcess As New Process()

                    myProcess.StartInfo.UseShellExecute = False
                    ' You can start any process, HelloWorld is a do-nothing example.
                    myProcess.StartInfo.FileName = "C:\\HelloWorld.exe"
                    myProcess.StartInfo.CreateNoWindow = True
                    myProcess.Start()
                    ' This code assumes the process you are starting will terminate itself. 
                    ' Given that it is started without a window so you cannot terminate it 
                    ' on the desktop, it must terminate itself or you can do it programmatically
                    ' from this application using the Kill method.
                End Using
            Catch e As Exception
                Console.WriteLine((e.Message))
            End Try
        End Sub
    End Class
End Namespace

다음 예제에서는 클래스 자체 및 정적 Start 메서드를 사용하여 Process 프로세스를 시작합니다.

using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
{
    class MyProcess
    {
        // Opens the Internet Explorer application.
        void OpenApplication(string myFavoritesPath)
        {
            // Start Internet Explorer. Defaults to the home page.
            Process.Start("IExplore.exe");

            // Display the contents of the favorites folder in the browser.
            Process.Start(myFavoritesPath);
        }

        // Opens urls and .html documents using Internet Explorer.
        void OpenWithArguments()
        {
            // url's are not considered documents. They can only be opened
            // by passing them as arguments.
            Process.Start("IExplore.exe", "www.northwindtraders.com");

            // Start a Web page using a browser associated with .html and .asp files.
            Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
            Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");
        }

        // Uses the ProcessStartInfo class to start new processes,
        // both in a minimized mode.
        void OpenWithStartInfo()
        {
            ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
            startInfo.WindowStyle = ProcessWindowStyle.Minimized;

            Process.Start(startInfo);

            startInfo.Arguments = "www.northwindtraders.com";

            Process.Start(startInfo);
        }

        static void Main()
        {
            // Get the path that stores favorite links.
            string myFavoritesPath =
                Environment.GetFolderPath(Environment.SpecialFolder.Favorites);

            MyProcess myProcess = new MyProcess();

            myProcess.OpenApplication(myFavoritesPath);
            myProcess.OpenWithArguments();
            myProcess.OpenWithStartInfo();
        }
    }
}
module processstartstatic

open System
open System.Diagnostics

// Opens the Internet Explorer application.
let openApplication (myFavoritesPath: string) =
    // Start Internet Explorer. Defaults to the home page.
    Process.Start "IExplore.exe" |> ignore

    // Display the contents of the favorites folder in the browser.
    Process.Start myFavoritesPath |> ignore

// Opens urls and .html documents using Internet Explorer.
let openWithArguments () =
    // url's are not considered documents. They can only be opened
    // by passing them as arguments.
    Process.Start("IExplore.exe", "www.northwindtraders.com") |> ignore

    // Start a Web page using a browser associated with .html and .asp files.
    Process.Start("IExplore.exe", @"C:\myPath\myFile.htm") |> ignore
    Process.Start("IExplore.exe", @"C:\myPath\myFile.asp") |> ignore

// Uses the ProcessStartInfo class to start new processes,
// both in a minimized mode.
let openWithStartInfo () =
    let startInfo = ProcessStartInfo "IExplore.exe"
    startInfo.WindowStyle <- ProcessWindowStyle.Minimized

    Process.Start startInfo |> ignore

    startInfo.Arguments <- "www.northwindtraders.com"

    Process.Start startInfo |> ignore

// Get the path that stores favorite links.
let myFavoritesPath = Environment.GetFolderPath Environment.SpecialFolder.Favorites

openApplication myFavoritesPath
openWithArguments ()
openWithStartInfo ()
Imports System.Diagnostics
Imports System.ComponentModel

Namespace MyProcessSample
    Class MyProcess
        ' Opens the Internet Explorer application.
        Public Sub OpenApplication(myFavoritesPath As String)
            ' Start Internet Explorer. Defaults to the home page.
            Process.Start("IExplore.exe")

            ' Display the contents of the favorites folder in the browser.
            Process.Start(myFavoritesPath)
        End Sub

        ' Opens URLs and .html documents using Internet Explorer.
        Sub OpenWithArguments()
            ' URLs are not considered documents. They can only be opened
            ' by passing them as arguments.
            Process.Start("IExplore.exe", "www.northwindtraders.com")

            ' Start a Web page using a browser associated with .html and .asp files.
            Process.Start("IExplore.exe", "C:\myPath\myFile.htm")
            Process.Start("IExplore.exe", "C:\myPath\myFile.asp")
        End Sub

        ' Uses the ProcessStartInfo class to start new processes,
        ' both in a minimized mode.
        Sub OpenWithStartInfo()
            Dim startInfo As New ProcessStartInfo("IExplore.exe")
            startInfo.WindowStyle = ProcessWindowStyle.Minimized

            Process.Start(startInfo)

            startInfo.Arguments = "www.northwindtraders.com"

            Process.Start(startInfo)
        End Sub

        Shared Sub Main()
            ' Get the path that stores favorite links.
            Dim myFavoritesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites)

            Dim myProcess As New MyProcess()

            myProcess.OpenApplication(myFavoritesPath)
            myProcess.OpenWithArguments()
            myProcess.OpenWithStartInfo()
        End Sub
    End Class
End Namespace 'MyProcessSample

다음 F# 예제에서는 프로세스를 시작하고, 모든 출력 및 오류 정보를 캡처하고, 프로세스가 실행된 시간(밀리초)을 기록하는 함수를 정의 runProc 합니다. 함수에는 runProc 시작할 애플리케이션의 이름, 애플리케이션에 제공할 인수 및 시작 디렉터리의 세 가지 매개 변수가 있습니다.

open System
open System.Diagnostics

let runProc filename args startDir : seq<string> * seq<string> = 
    let timer = Stopwatch.StartNew()
    let procStartInfo = 
        ProcessStartInfo(
            RedirectStandardOutput = true,
            RedirectStandardError = true,
            UseShellExecute = false,
            FileName = filename,
            Arguments = args
        )
    match startDir with | Some d -> procStartInfo.WorkingDirectory <- d | _ -> ()

    let outputs = System.Collections.Generic.List<string>()
    let errors = System.Collections.Generic.List<string>()
    let outputHandler f (_sender:obj) (args:DataReceivedEventArgs) = f args.Data
    use p = new Process(StartInfo = procStartInfo)
    p.OutputDataReceived.AddHandler(DataReceivedEventHandler (outputHandler outputs.Add))
    p.ErrorDataReceived.AddHandler(DataReceivedEventHandler (outputHandler errors.Add))
    let started = 
        try
            p.Start()
        with | ex ->
            ex.Data.Add("filename", filename)
            reraise()
    if not started then
        failwithf "Failed to start process %s" filename
    printfn "Started %s with pid %i" p.ProcessName p.Id
    p.BeginOutputReadLine()
    p.BeginErrorReadLine()
    p.WaitForExit()
    timer.Stop()
    printfn "Finished %s after %A milliseconds" filename timer.ElapsedMilliseconds
    let cleanOut l = l |> Seq.filter (fun o -> String.IsNullOrEmpty o |> not)
    cleanOut outputs,cleanOut errors

함수에 runProc 대한 코드는 ImaginaryDevelopment 에서 작성되었으며 Microsoft 공용 라이선스에서 사용할 수 있습니다.

설명

Process 구성 요소는 컴퓨터에서 실행 중인 프로세스에 대한 액세스를 제공합니다. 가장 간단한 용어로 프로세스는 실행 중인 앱입니다. 스레드는 운영 체제에서 프로세서 시간을 할당하는 기본 단위입니다. 스레드는 현재 다른 스레드에서 실행 중인 파트를 포함하여 프로세스 코드의 모든 부분을 실행할 수 있습니다.

Process 구성 요소는 앱을 시작, 중지, 제어 및 모니터링하는 데 유용한 도구입니다. 구성 요소를 사용하여 Process 실행 중인 프로세스 목록을 가져오거나 새 프로세스를 시작할 수 있습니다. Process 구성 요소는 시스템 프로세스에 액세스하는 데 사용됩니다. Process 구성 요소가 초기화된 후 실행 중인 프로세스에 대한 정보를 가져오는 데 사용할 수 있습니다. 이러한 정보에는 스레드 집합, 로드된 모듈(.dll 및 .exe 파일) 및 프로세스에서 사용하는 메모리 양과 같은 성능 정보가 포함됩니다.

이 형식은 IDisposable 인터페이스를 구현합니다. 형식 사용을 마쳤으면 직접 또는 간접적으로 삭제해야 합니다. 형식을 직접 삭제하려면 Disposetry/ 블록에서 해당 finally 메서드를 호출합니다. 간접적으로 삭제하려면 using(C#) 또는 Using(Visual Basic)와 같은 언어 구문을 사용합니다. 자세한 내용은 IDisposable 인터페이스 설명서의 "IDisposable을 구현하는 개체 사용" 섹션을 참조하세요.

중요합니다

신뢰할 수 없는 데이터를 사용하여 이 클래스에서 메서드를 호출하는 것은 보안 위험입니다. 신뢰할 수 있는 데이터로만 이 클래스의 메서드를 호출합니다. 자세한 내용은 모든 입력 유효성 검사참조하세요.

메모

32비트 프로세스는 64비트 프로세스의 모듈에 액세스할 수 없습니다. 32비트 프로세스에서 64비트 프로세스에 대한 정보를 얻으려고 하면 예외가 발생합니다 Win32Exception . 반면에 64비트 프로세스는 32비트 프로세스의 모듈에 액세스할 수 있습니다.

프로세스 구성 요소는 속성 그룹에 대한 정보를 한 번에 가져옵니다. Process 구성 요소가 그룹의 한 멤버에 대한 정보를 가져온 후에는 해당 그룹의 다른 속성에 대한 값을 캐시하고 메서드를 호출 Refresh 할 때까지 그룹의 다른 멤버에 대한 새 정보를 가져오지 않습니다. 따라서 속성 값이 메서드에 대한 마지막 호출 Refresh 보다 더 최신이 되도록 보장되지는 않습니다. 그룹 분석은 운영 체제에 따라 다릅니다.

따옴표를 사용하여 시스템에 선언된 경로 변수가 있는 경우 해당 위치에서 찾은 프로세스를 시작할 때 해당 경로를 정규화해야 합니다. 그렇지 않으면 시스템에서 경로를 찾을 수 없습니다. 예를 들어 경로에 없는 경우 c:\mypath 따옴표를 path = %path%;"c:\mypath"사용하여 추가합니다. 시작 시 프로세스를 c:\mypath 완전히 한정해야 합니다.

시스템 프로세스는 해당 프로세스 식별자에 의해 시스템에서 고유하게 식별됩니다. 많은 Windows 리소스와 마찬가지로 프로세스는 컴퓨터에서 고유하지 않을 수 있는 핸들로도 식별됩니다. 핸들은 리소스 식별자에 대한 제네릭 용어입니다. 운영 체제는 프로세스가 종료된 경우에도 구성 요소의 Process 속성을 통해 Handle 액세스되는 프로세스 핸들을 유지합니다. 따라서 프로세스의 관리 정보(일반적으로 성공의 경우 0 또는 0이 아닌 오류 코드)와 같은 ExitCode 관리 정보를 가져올 수 있습니다 ExitTime. 핸들은 매우 유용한 리소스이므로 핸들 누수는 메모리 누수보다 더 악의적입니다.

macOS에서 다음 속성은 0을 반환합니다.

메모

이 클래스에는 모든 멤버에 적용되는 클래스 수준의 링크 요청 및 상속 요청이 포함됩니다. 직접 호출자 또는 파생 클래스가 완전 신뢰 권한을 가지지 않은 경우, SecurityException가 발생합니다. 보안 요구 사항에 대한 자세한 내용은 링크 요구를 참조하세요.

.NET Core 참고 사항

.NET Framework에서 클래스는 기본적으로 입력, Process 출력 및 오류 스트림에 대해 일반적으로 코드 페이지 인코딩인 인코딩을 사용합니다 Console . 예를 들어 문화권이 영어(미국)인 시스템에서 코드 페이지 437은 클래스의 Console 기본 인코딩입니다. 그러나 .NET Core는 이러한 인코딩의 제한된 하위 집합만 사용할 수 있습니다. 이 경우 기본 인코딩으로 사용됩니다 Encoding.UTF8 .

개체가 Process 특정 코드 페이지 인코딩에 의존하는 경우 메서드를 호출 Process하기 전에 다음을 수행하여 개체를 계속 사용할 수 있습니다.

  1. EncodingProvider 속성에서 CodePagesEncodingProvider.Instance 개체를 검색합니다.

  2. EncodingProvider 개체를 Encoding.RegisterProvider 메서드에 전달하여 인코딩 공급자가 지원하는 추가 인코딩을 사용할 수 있도록 합니다.

Process 그런 다음 메서드를 호출 Process 하기 전에 인코딩 공급자를 등록한 경우 클래스는 UTF8이 아닌 기본 시스템 인코딩을 자동으로 사용합니다.

생성자

Name Description
Process()

Process 클래스의 새 인스턴스를 초기화합니다.

속성

Name Description
BasePriority

연결된 프로세스의 기본 우선 순위를 가져옵니다.

CanRaiseEvents

구성 요소가 이벤트를 발생시키는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Component)
Container

IContainer 포함하는 값을 가져옵니다 Component.

(다음에서 상속됨 Component)
DesignMode

현재 디자인 모드인지 여부를 Component 나타내는 값을 가져옵니다.

(다음에서 상속됨 Component)
EnableRaisingEvents

프로세스가 종료될 때 이벤트를 발생시켜야 하는지 여부를 Exited 가져오거나 설정합니다.

Events

Component에 연결된 이벤트 처리기 목록을 가져옵니다.

(다음에서 상속됨 Component)
ExitCode

연결된 프로세스가 종료될 때 지정한 값을 가져옵니다.

ExitTime

연결된 프로세스가 종료된 시간을 가져옵니다.

Handle

연결된 프로세스의 네이티브 핸들을 가져옵니다.

HandleCount

프로세스에서 연 핸들 수를 가져옵니다.

HasExited

연결된 프로세스가 종료되었는지 여부를 나타내는 값을 가져옵니다.

Id

연결된 프로세스의 고유 식별자를 가져옵니다.

MachineName

연결된 프로세스가 실행 중인 컴퓨터의 이름을 가져옵니다.

MainModule

연결된 프로세스의 주 모듈을 가져옵니다.

MainWindowHandle

연결된 프로세스의 주 창에 대한 창 핸들을 가져옵니다.

MainWindowTitle

프로세스의 주 창 캡션을 가져옵니다.

MaxWorkingSet

연결된 프로세스에 허용되는 최대 작업 집합 크기를 바이트 단위로 가져오거나 설정합니다.

MinWorkingSet

연결된 프로세스에 대해 허용되는 최소 작업 집합 크기(바이트)를 가져오거나 설정합니다.

Modules

연결된 프로세스에서 로드한 모듈을 가져옵니다.

NonpagedSystemMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스에 할당된 페이징되지 않은 시스템 메모리의 양(바이트)을 가져옵니다.

NonpagedSystemMemorySize64

연결된 프로세스에 할당된 페이징되지 않은 시스템 메모리의 양(바이트)을 가져옵니다.

PagedMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스에 할당된 페이징된 메모리의 양(바이트)을 가져옵니다.

PagedMemorySize64

연결된 프로세스에 할당된 페이징된 메모리의 양(바이트)을 가져옵니다.

PagedSystemMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스에 할당된 페이징 가능한 시스템 메모리의 양(바이트)을 가져옵니다.

PagedSystemMemorySize64

연결된 프로세스에 할당된 페이징 가능한 시스템 메모리의 양(바이트)을 가져옵니다.

PeakPagedMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스에서 사용하는 가상 메모리 페이징 파일의 최대 메모리 양(바이트)을 가져옵니다.

PeakPagedMemorySize64

연결된 프로세스에서 사용하는 가상 메모리 페이징 파일의 최대 메모리 양(바이트)을 가져옵니다.

PeakVirtualMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스에서 사용하는 최대 가상 메모리 양(바이트)을 가져옵니다.

PeakVirtualMemorySize64

연결된 프로세스에서 사용하는 최대 가상 메모리 양(바이트)을 가져옵니다.

PeakWorkingSet
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스의 최대 작업 집합 크기를 바이트 단위로 가져옵니다.

PeakWorkingSet64

연결된 프로세스에서 사용하는 실제 메모리의 최대 양(바이트)을 가져옵니다.

PriorityBoostEnabled

주 창에 포커스가 있을 때 운영 체제에서 연결된 프로세스 우선 순위를 일시적으로 높일지 여부를 나타내는 값을 가져오거나 설정합니다.

PriorityClass

연결된 프로세스의 전체 우선 순위 범주를 가져오거나 설정합니다.

PrivateMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스에 할당된 프라이빗 메모리의 양(바이트)을 가져옵니다.

PrivateMemorySize64

연결된 프로세스에 할당된 프라이빗 메모리의 양(바이트)을 가져옵니다.

PrivilegedProcessorTime

이 프로세스에 대한 권한 있는 프로세서 시간을 가져옵니다.

ProcessName

프로세스의 이름을 가져옵니다.

ProcessorAffinity

이 프로세스의 스레드를 실행하도록 예약할 수 있는 프로세서를 가져오거나 설정합니다.

Responding

프로세스의 사용자 인터페이스가 응답하는지 여부를 나타내는 값을 가져옵니다.

SafeHandle

이 프로세스에 대한 네이티브 핸들을 가져옵니다.

SessionId

연결된 프로세스에 대한 터미널 서비스 세션 식별자를 가져옵니다.

Site

ISite값을 Component 가져오거나 설정합니다.

(다음에서 상속됨 Component)
StandardError

애플리케이션의 오류 출력을 읽는 데 사용되는 스트림을 가져옵니다.

StandardInput

애플리케이션의 입력을 작성하는 데 사용되는 스트림을 가져옵니다.

StandardOutput

애플리케이션의 텍스트 출력을 읽는 데 사용되는 스트림을 가져옵니다.

StartInfo

메서드에 전달할 Start()Process속성을 가져오거나 설정합니다.

StartTime

연결된 프로세스가 시작된 시간을 가져옵니다.

SynchronizingObject

프로세스 종료 이벤트의 결과로 발급된 이벤트 처리기 호출을 마샬링하는 데 사용되는 개체를 가져오거나 설정합니다.

Threads

연결된 프로세스에서 실행 중인 스레드 집합을 가져옵니다.

TotalProcessorTime

이 프로세스의 총 프로세서 시간을 가져옵니다.

UserProcessorTime

이 프로세스의 사용자 프로세서 시간을 가져옵니다.

VirtualMemorySize
사용되지 않음.
사용되지 않음.
사용되지 않음.

프로세스의 가상 메모리 크기(바이트)를 가져옵니다.

VirtualMemorySize64

연결된 프로세스에 할당된 가상 메모리의 양(바이트)을 가져옵니다.

WorkingSet
사용되지 않음.
사용되지 않음.
사용되지 않음.

연결된 프로세스의 실제 메모리 사용량을 바이트 단위로 가져옵니다.

WorkingSet64

연결된 프로세스에 할당된 실제 메모리의 양(바이트)을 가져옵니다.

메서드

Name Description
BeginErrorReadLine()

애플리케이션의 리디렉션된 StandardError 스트림에서 비동기 읽기 작업을 시작합니다.

BeginOutputReadLine()

애플리케이션의 리디렉션된 StandardOutput 스트림에서 비동기 읽기 작업을 시작합니다.

CancelErrorRead()

애플리케이션의 리디렉션된 StandardError 스트림에서 비동기 읽기 작업을 취소합니다.

CancelOutputRead()

애플리케이션의 리디렉션된 StandardOutput 스트림에서 비동기 읽기 작업을 취소합니다.

Close()

이 구성 요소와 연결된 모든 리소스를 해제합니다.

CloseMainWindow()

주 창에 닫기 메시지를 보내 사용자 인터페이스가 있는 프로세스를 닫습니다.

CreateObjRef(Type)

원격 개체와 통신하는 데 사용되는 프록시를 생성하는 데 필요한 모든 관련 정보를 포함하는 개체를 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
Dispose()

관리되지 않는 리소스의 해제, 해제 또는 재설정과 관련된 애플리케이션 정의 작업을 수행합니다.

Dispose()

에서 사용하는 모든 리소스를 Component해제합니다.

(다음에서 상속됨 Component)
Dispose(Boolean)

이 프로세스에서 사용하는 모든 리소스를 해제합니다.

EnterDebugMode()

현재 스레드에서 네이 Process 티브 속성을 SeDebugPrivilege 사용하도록 설정하여 특수 모드에서 실행되는 운영 체제 프로세스와 상호 작용하도록 구성 요소를 상태에 놓습니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetCurrentProcess()

Process 구성 요소를 가져오고 현재 활성 프로세스와 연결합니다.

GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 현재 수명 서비스 개체를 검색합니다.

(다음에서 상속됨 MarshalByRefObject)
GetProcessById(Int32, String)

네트워크에 있는 컴퓨터의 이름 및 프로세스 식별자를 지정하여 새 Process 구성 요소를 반환합니다.

GetProcessById(Int32)

로컬 컴퓨터에서 프로세스의 식별자를 지정하여 새 Process 구성 요소를 반환합니다.

GetProcesses()

로컬 컴퓨터의 각 프로세스 리소스에 대한 새 Process 구성 요소를 만듭니다.

GetProcesses(String)

지정된 컴퓨터의 각 프로세스 리소스에 대한 새 Process 구성 요소를 만듭니다.

GetProcessesByName(String, String)

Process 구성 요소의 배열을 만들고 지정된 프로세스 이름을 공유하는 원격 컴퓨터의 모든 프로세스 리소스와 연결합니다.

GetProcessesByName(String)

Process 구성 요소의 배열을 만들고 지정된 프로세스 이름을 공유하는 로컬 컴퓨터의 모든 프로세스 리소스와 연결합니다.

GetService(Type)

또는 해당 서비스에서 제공하는 서비스를 나타내는 개체를 Component 반환합니다 Container.

(다음에서 상속됨 Component)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
InitializeLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 수명 서비스 개체를 가져옵니다.

(다음에서 상속됨 MarshalByRefObject)
Kill()

연결된 프로세스를 즉시 중지합니다.

Kill(Boolean)

연결된 프로세스를 즉시 중지하고 필요에 따라 자식/하위 프로세스를 중지합니다.

LeaveDebugMode()

특수 모드에서 Process 실행되는 운영 체제 프로세스와 상호 작용할 수 있는 상태에서 구성 요소를 가져옵니다.

MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
MemberwiseClone(Boolean)

현재 MarshalByRefObject 개체의 단순 복사본을 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
OnExited()

Exited 이벤트를 발생시킵니다.

Refresh()

프로세스 구성 요소 내에 캐시된 연결된 프로세스에 대한 모든 정보를 삭제합니다.

Start()

Process 구성 요소의 속성에 지정된 프로세스 리소스를 StartInfo 시작(또는 다시 사용)하고 구성 요소와 연결합니다.

Start(ProcessStartInfo)

프로세스 시작 정보(예: 시작할 프로세스의 파일 이름)를 포함하는 매개 변수에 의해 지정된 프로세스 리소스를 시작하고 리소스를 새 Process 구성 요소와 연결합니다.

Start(String, IEnumerable<String>)

애플리케이션의 이름과 명령줄 인수 집합을 지정하여 프로세스 리소스를 시작합니다.

Start(String, String, SecureString, String)

애플리케이션의 이름, 사용자 이름, 암호 및 도메인을 지정하여 프로세스 리소스를 시작하고 리소스를 새 Process 구성 요소와 연결합니다.

Start(String, String, String, SecureString, String)

애플리케이션의 이름, 명령줄 인수 집합, 사용자 이름, 암호 및 도메인을 지정하고 리소스를 새 Process 구성 요소와 연결하여 프로세스 리소스를 시작합니다.

Start(String, String)

애플리케이션의 이름과 명령줄 인수 집합을 지정하여 프로세스 리소스를 시작하고 리소스를 새 Process 구성 요소와 연결합니다.

Start(String)

문서 또는 애플리케이션 파일의 이름을 지정하여 프로세스 리소스를 시작하고 리소스를 새 Process 구성 요소와 연결합니다.

ToString()

해당하는 경우 프로세스의 이름을 부모 구성 요소 형식과 결합된 문자열로 서식을 지정합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
WaitForExit()

Process 연결된 프로세스가 종료될 때까지 무기한 대기하도록 구성 요소에 지시합니다.

WaitForExit(Int32)

Process 연결된 프로세스가 종료될 때까지 지정된 시간(밀리초)을 기다리도록 구성 요소에 지시합니다.

WaitForExit(TimeSpan)

프로세스 구성 요소에 연결된 프로세스가 종료될 때까지 지정된 시간을 기다리도록 지시합니다.

WaitForExitAsync(CancellationToken)

프로세스 구성 요소에 연결된 프로세스가 종료 cancellationToken 되거나 취소될 때까지 기다리도록 지시합니다.

WaitForInputIdle()

Process 연결된 프로세스가 유휴 상태로 전환될 때까지 구성 요소가 무기한 대기하도록 합니다. 이 오버로드는 사용자 인터페이스가 있는 프로세스 및 따라서 메시지 루프에만 적용됩니다.

WaitForInputIdle(Int32)

Process 구성 요소가 연결된 프로세스가 유휴 상태로 전환될 때까지 지정된 시간(밀리초)을 기다립니다. 이 오버로드는 사용자 인터페이스가 있는 프로세스 및 따라서 메시지 루프에만 적용됩니다.

WaitForInputIdle(TimeSpan)

Process 구성 요소가 지정된 프로세스에서 timeout 유휴 상태가 될 때까지 기다립니다. 이 오버로드는 사용자 인터페이스가 있는 프로세스 및 따라서 메시지 루프에만 적용됩니다.

이벤트

Name Description
Disposed

구성 요소가 메서드 호출에 Dispose() 의해 삭제될 때 발생합니다.

(다음에서 상속됨 Component)
ErrorDataReceived

애플리케이션이 리디렉션된 StandardError 스트림에 쓸 때 발생합니다.

Exited

프로세스가 종료되면 발생합니다.

OutputDataReceived

애플리케이션이 리디렉션된 StandardOutput 스트림에 줄을 쓸 때마다 발생합니다.

적용 대상

추가 정보