Share via


IDebugBreakpointUnboundEvent2::GetBreakpoint

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. 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

Gets the breakpoint that became unbound.

Syntax

HRESULT GetBreakpoint(
    IDebugBoundBreakpoint2** ppBP
);
int GetBreakpoint(
    out IDebugBoundBreakpoint2 ppBP
);

Parameters

ppBP
[out] Returns an IDebugBoundBreakpoint2 object that represents the breakpoint that became unbound.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Example

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

STDMETHODIMP CBreakpointUnboundDebugEventBase::GetBreakpoint(
    IDebugBoundBreakpoint2 **ppbp)
{
    HRESULT hRes = E_FAIL;

    if ( ppbp )
    {
        if ( m_pbp )
        {
            IDebugBoundBreakpoint2 *pibp;

            hRes = m_pbp->QueryInterface(IID_IDebugBoundBreakpoint2, (void **) & pibp);

            if ( S_OK == hRes )
                *ppbp = pibp;
        }
        else
            hRes = E_FAIL;
    }
    else
        hRes = E_INVALIDARG;

    return ( hRes );
}

See also