IDebugBreakpointErrorEvent2::GetErrorBreakpoint

Gets an IDebugErrorBreakpoint2 object that describes the reason why a breakpoint was not bound.

HRESULT GetErrorBreakpoint( 
   IDebugErrorBreakpoint2** ppErrorBP
);
int GetErrorBreakpoint( 
   out IDebugErrorBreakpoint2 ppErrorBP
);

Parameters

Return Value

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

Remarks

After the IDebugErrorBreakpoint2 interface is obtained, call the IDebugErrorBreakpoint2::GetBreakpointResolution method to get an IDebugErrorBreakpointResolution2 object. Then the IDebugErrorBreakpointResolution2::GetResolutionInfo method can be used to determine an invalid location, an invalid expression, or reasons why the pending breakpoint was not bound, such as code not loaded yet, and so on.

Example

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

STDMETHODIMP CBreakpointErrorDebugEventBase::GetErrorBreakpoint(
    IDebugErrorBreakpoint2 **ppbp)
{
    HRESULT hRes = E_FAIL;

    if ( ppbp )
    {
        if ( m_pError )
        {
            *ppbp = m_pError;

            m_pError->AddRef();

            hRes = S_OK;
        }
        else
            hRes = E_FAIL;
    }
    else
        hRes = E_INVALIDARG;

    return ( hRes );
}

See Also

Reference

IDebugBreakpointErrorEvent2

IDebugErrorBreakpointResolution2

IDebugErrorBreakpoint2