Partager via


Process3.Name, propriété

Obtient le nom du processus.

Espace de noms :  EnvDTE90
Assembly :  EnvDTE90 (dans EnvDTE90.dll)

Syntaxe

'Déclaration
ReadOnly Default Property Name As String
string this { get; }
property String^ default {
    String^ get ();
}
abstract Name : string with get
function get Name () : String

Valeur de propriété

Type : String
Chaîne qui représente le nom du processus.

Exemples

' Macro code.
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
Imports Microsoft.VisualBasic.ControlChars

Public Module Module1

    Sub NativeAttachToLocalCalc()
        Dim dbg2 As EnvDTE90.Debugger3
        dbg2 = DTE.Debugger

        Dim attached As Boolean = False
        Dim proc As EnvDTE90.Process3
        For Each proc In DTE.Debugger.LocalProcesses
            If (Right(proc.Name, 8) = "calc.exe") Then
                proc.Attach2("native")
                attached = True
                Exit For
            End If
        Next

        If attached = False Then
            If attached = False Then
                MsgBox("calc.exe isn't running")
            End If
        End If
    End Sub
End Module

Sécurité .NET Framework

Voir aussi

Référence

Process3 Interface

EnvDTE90, espace de noms