次の方法で共有


IDebugProgramNode2::Attach_V7

DEPRECATED. DO NOT USE.

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 IDebugEngine2::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 IDebugProgram2::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

Reference

IDebugProgramNode2

IDebugProgramNodeAttach2

IDebugEngine2::Attach

IDebugProgram2

IDebugEventCallback2

IDebugEngineCreateEvent2

IDebugProgramCreateEvent2

IDebugLoadCompleteEvent2

IDebugEntryPointEvent2

ATTACH_REASON