次の方法で共有


Process3.Name プロパティ

プロセスの名前を取得します。

名前空間:  EnvDTE90
アセンブリ:  EnvDTE90 (EnvDTE90.dll 内)

構文

'宣言
ReadOnly Default Property Name As String
    Get
string this { get; }
property String^ default {
    String^ get ();
}
abstract Name : string
function get Name () : String

プロパティ値

型: System.String
プロセスの名前を表す文字列。

実装

Process2.Name

' 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

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

Process3 インターフェイス

Name オーバーロード

EnvDTE90 名前空間