IDebugProgramNodeAttach2::OnAttach

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

HRESULT OnAttach(
   [in] REFGUID guidProgramId
);
int OnAttach(
   ref Guid guidProgramId
};

Parameters

  • guidProgramId
    [in] GUID to assign to the associated program.

Return Value

If successful, returns S_OK. Returns S_FALSE if the IDebugEngine2::Attach method should not be called. Otherwise, returns an error code.

Remarks

This method is called during the attach process, before the IDebugEngine2::Attach method is called. The OnAttach method can perform the attach process itself (in which case, this method returns S_FALSE) or defer the attach process to the IDebugEngine2::Attach method (the OnAttach method returns S_OK). In either event, the OnAttach method can set the GUID of the program being debugged to the given GUID.

See Also

Concepts

IDebugProgramNodeAttach2

IDebugEngine2::Attach