언어

Process.TryGetProcessById(Int32, Process) 메서드

정의

지정된 프로세스 ID를 사용하여 Process 기존 프로세스에 대한 인스턴스를 가져오려고 시도합니다.

public:
 static bool TryGetProcessById(int processId, [Runtime::InteropServices::Out] System::Diagnostics::Process ^ % process);
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static bool TryGetProcessById(int processId, out System.Diagnostics.Process? process);
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member TryGetProcessById : int * Process -> bool
Public Shared Function TryGetProcessById (processId As Integer, ByRef process As Process) As Boolean

매개 변수

processId
Int32

찾을 프로세스의 프로세스 ID입니다.

process
Process

이 메서드가 반환 true되면 기존 프로세스를 나타내는 값이 포함 Process 됩니다. 그렇지 않으면 null.

반품

true프로세스가 발견되었으면 다음을 수행합니다. 그렇지 않으면 . false

특성

예외

processId 가 0보다 작거나 같습니다.

적용 대상