Condividi tramite


IDebugProgramNodeAttach2

Allows a program node to be notified of an attempt to attach to the associated program.

IDebugProgramNodeAttach2 : IUnknown

Notes for Implementers

This interface is implemented on the same class that implements the IDebugProgramNode2 interface in order to receive notification of an attach operation and to provide an opportunity to cancel the attach operation.

Notes for Callers

Obtain this interface by calling the QueryInterface method in an IDebugProgramNode2 object. The IDebugProgramNodeAttach2::OnAttach method must be called before the IDebugEngine2::Attach method to give the program node a chance to stop the attach process.

Methods in Vtable Order

This interface implements the following method:

Method

Description

IDebugProgramNodeAttach2::OnAttach

Attaches to the associated program or defers the attach process to the IDebugEngine2::Attach method.

Remarks

This interface is the preferred alternative to the deprecated IDebugProgramNode2::Attach_V7 method. All debug engines are always loaded with the CoCreateInstance function, that is, they are instantiated outside the address space of the program being debugged.

If a previous implementation of the IDebugProgramNode2::Attach_V7 method was simply setting the GUID of the program being debugged, then only the IDebugProgramNodeAttach2::OnAttach method needs to be implemented.

If a previous implementation of the IDebugProgramNode2::Attach_V7 method used the callback interface that was provided, then that functionality needs to be moved to an implementation of the IDebugEngine2::Attach method and the IDebugProgramNodeAttach2 interface does not have to be implemented.

Requirements

Header: Msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See Also

Reference

IDebugProgramNode2

IDebugEngine2::Attach

IDebugProgramNode2::Attach_V7

Concepts

Core Interfaces