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)


<GuidAttribute("D401C665-4EC7-452B-AA91-985D16772D84")> _
Public Interface Process3 _
    Inherits Process2
public interface Process3 : Process2
public interface class Process3 : Process2
type Process3 =  
        interface Process2
public interface Process3 extends Process2

The Process3 type exposes the following members.


  Name Description
Public property Collection (Inherited from Process2.)
Public property Collection Gets a Processes collection that contains the object that supports this property or is contained within this code construct.
Public property DTE (Inherited from Process2.)
Public property DTE Gets the top-level extensibility object, the DTE object.
Public property IsBeingDebugged (Inherited from Process2.)
Public property IsBeingDebugged Gets whether the current process is being debugged.
Public property Modules Gets a collection of module objects associated with this process.
Public property Name (Inherited from Process2.)
Public property Name Gets the name of the process.
Public property Parent (Inherited from Process2.)
Public property Parent Gets the immediate parent object of a Process2 object.
Public property ProcessID (Inherited from Process2.)
Public property ProcessID Gets the ID number assigned to this process.
Public property Programs (Inherited from Process2.)
Public property Programs Gets a collection of Program objects.
Public property Threads (Inherited from Process2.)
Public property Threads Gets the threads associated with this process.
Public property Transport (Inherited from Process2.)
Public property Transport Gets the Transport being used to debug this process.
Public property TransportQualifier (Inherited from Process2.)
Public property TransportQualifier Gets a computer name or an IP address.
Public property UserName (Inherited from Process2.)
Public property UserName Gets the user name associated with this process.



  Name Description
Public method Attach() (Inherited from Process2.)
Public method Attach() Causes the debugger to attach this process.
Public method Attach2(Object) (Inherited from Process2.)
Public method Attach2(Object) Similar to Attach, causes the debugger to attach this process, except that it allows you to specify an engine or set of engines.
Public method Break(Boolean) (Inherited from Process2.)
Public method Break(Boolean) Causes the given process to pause its execution so that its current state can be analyzed.
Public method Detach(Boolean) (Inherited from Process2.)
Public method Detach(Boolean) Causes the debugger to detach from this process.
Public method Terminate(Boolean) (Inherited from Process2.)
Public method Terminate(Boolean) Terminates this process.



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


' 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
                attached = True
                Exit For
            End If

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

See Also


EnvDTE90 Namespace

Other Resources

Automation Object Model Chart