IDebugErrorBreakpointResolution2::GetBreakpointType
Gets the breakpoint type.
HRESULT GetBreakpointType(
BP_TYPE* pBPType
);
int GetBreakpointType(
out enum_BP_TYPE pBPType
);
Parameters
- pBPType
[out] Returns a value from the BP_TYPE enumeration that describes the type of breakpoint.
Return Value
If successful, returns S_OK; otherwise, returns an error code.
Remarks
This method returns the type of the breakpoint that failed to bind, thus requiring an error breakpoint event.
Example
The following example shows how to implement this method for a simple CDebugErrorBreakpointResolution object that exposes the IDebugErrorBreakpointResolution2 interface.
HRESULT CDebugErrorBreakpointResolution::GetBreakpointType(BP_TYPE* pBPType)
{
HRESULT hr;
if (pBPType)
{
// Set default BP_TYPE.
*pBPType = BPT_NONE;
// Check if the BPERESI_BPRESLOCATION flag is set in BPERESI_FIELDS.
if (IsFlagSet(m_bpErrorResolutionInfo.dwFields, BPERESI_BPRESLOCATION))
{
// Set the new BP_TYPE.
*pBPType = m_bpErrorResolutionInfo.bpResLocation.bpType;
hr = S_OK;
}
else
{
hr = E_FAIL;
}
}
else
{
hr = E_INVALIDARG;
}
return hr;
}