Process.TryGetProcessById(Int32, Process) Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Egy meglévő folyamat példányának lekérése Process a megadott folyamatazonosítóval.
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
Paraméterek
- processId
- Int32
A megkeresendő folyamat folyamatazonosítója.
- process
- Process
Ha ez a metódus visszatér true, a Process meglévő folyamatot jelöli, ellenkező esetben null.
Válaszok
trueha a folyamat megtalálható; egyéb esetben. false
- Attribútumok
Kivételek
processId nullánál kisebb vagy egyenlő.