다음을 통해 공유


IDebugProgramNodeAttach2

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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

Syntax

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 OnAttach method must be called before the 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
OnAttach Attaches to the associated program or defers the attach process to the Attach method.

Remarks

This interface is the preferred alternative to the deprecated 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 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 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

Core Interfaces
IDebugProgramNode2
Attach
Attach_V7