Taal

Process.TryGetProcessById(Int32, Process) Methode

Definitie

Probeert een Process exemplaar op te halen voor een bestaand proces met de opgegeven proces-id.

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

Parameters

processId
Int32

De proces-id van het proces dat moet worden gevonden.

process
Process

Wanneer deze methode wordt geretourneerd true, bevat een Process weergave van het bestaande proces; anders null.

Retouren

true indien het proces is gevonden; anders, false.

Kenmerken

Uitzonderingen

processId is kleiner dan of gelijk aan nul.

Van toepassing op