IDebugBreakpointBoundEvent2::EnumBoundBreakpoints
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
Creates an enumerator of breakpoints that were bound on this event.
Syntax
HRESULT EnumBoundBreakpoints(
IEnumDebugBoundBreakpoints2** ppEnum
);
int EnumBoundBreakpoints(
out IEnumDebugBoundBreakpoints2 ppEnum
);
Parameters
ppEnum
[out] Returns an IEnumDebugBoundBreakpoints2 object that enumerates all the breakpoints bound from this event.
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 GetPendingBreakpoint method to get the associated IDebugPendingBreakpoint2 object and then call the 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
IDebugBreakpointBoundEvent2
IEnumDebugBoundBreakpoints2
GetPendingBreakpoint
IDebugPendingBreakpoint2
EnumBoundBreakpoints