Partilhar via


IDebugBreakpointBoundEvent2::EnumBoundBreakpoints

Creates an enumerator of breakpoints that were bound on this event.

HRESULT EnumBoundBreakpoints( 
   IEnumDebugBoundBreakpoints2** ppEnum
);
int EnumBoundBreakpoints( 
   out IEnumDebugBoundBreakpoints2 ppEnum
);

Parameters

Return Value

If successful, returns S_OK. Returns S_FALSE if there are no bound breakpoints; otherwise, returns an error code.

Remarks

The list of bound breakpoints is for those bound to this event and might not be the entire list of breakpoints bound from a pending breakpoint. To get a list of all breakpoints bound to a pending breakpoint, call the IDebugBreakpointBoundEvent2::GetPendingBreakpoint method to get the associated IDebugPendingBreakpoint2 object and then call the IDebugPendingBreakpoint2::EnumBoundBreakpoints method to get an IEnumDebugBoundBreakpoints2 object which contains all the bound breakpoints for the pending breakpoint.

Example

The following example shows how to implement this method for a CBreakpointSetDebugEventBase object that exposes the IDebugBreakpointBoundEvent2 interface.

STDMETHODIMP CBreakpointSetDebugEventBase::EnumBoundBreakpoints(
    IEnumDebugBoundBreakpoints2 **ppEnum)
{
    HRESULT hRes = E_FAIL;

    if ( ppEnum )
    {
        if ( m_pEnumBound )
        {
            hRes = m_pEnumBound->Clone(ppEnum);

            if ( EVAL(S_OK == hRes) )
                (*ppEnum)->Reset();
        }
        else
            hRes = E_FAIL;
    }
    else
        hRes = E_INVALIDARG;

    return ( hRes );
}

See Also

Reference

IDebugBreakpointBoundEvent2

IEnumDebugBoundBreakpoints2

IDebugBreakpointBoundEvent2::GetPendingBreakpoint

IDebugPendingBreakpoint2

IDebugPendingBreakpoint2::EnumBoundBreakpoints