IDebugBreakpointUnboundEvent2::GetReason
Applies to: Visual Studio Visual 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 reason the breakpoint was unbound.
Syntax
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 );
}