IDebugProgramNode2::Attach_V7
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
DEPRECATED. DO NOT USE.
Syntax
HRESULT Attach_V7 (
IDebugProgram2* pMDMProgram,
IDebugEventCallback2* pCallback,
DWORD dwReason
);
int Attach_V7 (
IDebugProgram2 pMDMProgram,
IDebugEventCallback2 pCallback,
uint dwReason
);
Parameters
pMDMProgram
[in] The IDebugProgram2 interface that represents the program to attach to.
pCallback
[in] The IDebugEventCallback2 interface to be used to send debug events to the SDM.
dwReason
[in] A value from the ATTACH_REASON enumeration that specifies the reason for attaching.
Return Value
An implementation should always return E_NOTIMPL
.
Remarks
Warning
As of Visual Studio 2005, this method is no longer used and should always return E_NOTIMPL
. See the IDebugProgramNodeAttach2 interface for an alternative approach if the program node needs to indicate it cannot be attached to or if the program node is simply setting the program GUID
. Otherwise, implement the Attach method.
Prior to Visual Studio 2005
This method needs to be implemented only if the DE runs in the address space of the program being debugged. Otherwise, this method should return S_FALSE
.
When this method is called, the DE must send the IDebugEngineCreateEvent2 event object, if it has not already been sent for this instance of the IDebugEngine2 interface, as well as the IDebugProgramCreateEvent2 and IDebugLoadCompleteEvent2 event objects. The IDebugEntryPointEvent2 event object is then sent if the dwReason
parameter is ATTACH_REASON_LAUNCH
.
The DE must call the GetProgramId method on the IDebugProgram2 object supplied by the IDebugProgramCreateEvent2 event object, and must store that program's GUID in the instance data for the IDebugProgram2
object implemented by the DE.
See Also
IDebugProgramNode2
IDebugProgramNodeAttach2
Attach
IDebugProgram2
IDebugEventCallback2
IDebugEngineCreateEvent2
IDebugProgramCreateEvent2
IDebugLoadCompleteEvent2
IDebugEntryPointEvent2
ATTACH_REASON