Dela via


Process3 Interface

The Process3 object is used to examine and manipulate processes. The Process3 object supersedes the Process2 and Process objects.

Namespace:  EnvDTE90
Assembly:  EnvDTE90 (in EnvDTE90.dll)

Syntax

'Declaration
<GuidAttribute("D401C665-4EC7-452B-AA91-985D16772D84")> _
Public Interface Process3 _
    Inherits Process2
'Usage
Dim instance As Process3
[GuidAttribute("D401C665-4EC7-452B-AA91-985D16772D84")]
public interface Process3 : Process2
[GuidAttribute(L"D401C665-4EC7-452B-AA91-985D16772D84")]
public interface class Process3 : Process2
public interface Process3 extends Process2

Remarks

Process3 extends the Process2 to add support for the Modules collection.

Examples

' 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

See Also

Reference

Process3 Members

EnvDTE90 Namespace

Other Resources

Automation Object Model Chart