Share via


IDebugBreakpointUnboundEvent2::GetReason

Gets the reason the breakpoint was unbound.

HRESULT GetReason( 
   BP_UNBOUND_REASON* pdwUnboundReason
);
int GetReason( 
   out enum_ BP_UNBOUND_REASON pdwUnboundReason
);

Parameters

  • pdwUnboundReason
    [out] Returns a value from the BP_UNBOUND_REASON enumeration specifying the reason the breakpoint was unbound.

Return Value

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

Remarks

Reasons include a breakpoint being rebound to a different location after an edit-and-continue operation, or a determination that a breakpoint was bound in error.

Example

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

STDMETHODIMP CBreakpointUnboundDebugEventBase::GetReason(
    BP_UNBOUND_REASON* pdwUnboundReason)
{
    HRESULT hRes = E_FAIL;

    if ( EVAL(pdwUnboundReason) )
    {
        *pdwUnboundReason = m_dwReason;

        hRes = S_OK;
    }
    else
        hRes = E_INVALIDARG;

    return ( hRes );
}

See Also

Reference

IDebugBreakpointUnboundEvent2