description | title | ms.date | ms.topic | f1_keywords | helpviewer_keywords | author | ms.author | manager | ms.subservice | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the breakpoint type. |
IDebugErrorBreakpointResolution2::GetBreakpointType |
11/04/2016 |
reference |
|
|
maiak |
maiak |
mijacobs |
debug-diagnostics |
|
Gets the breakpoint type.
int GetBreakpointType(
out enum_BP_TYPE pBPType
);
HRESULT GetBreakpointType(
BP_TYPE* pBPType
);
pBPType
[out] Returns a value from the BP_TYPE enumeration that describes the type of breakpoint.
If successful, returns S_OK
; otherwise, returns an error code.
This method returns the type of the breakpoint that failed to bind, thus requiring an error breakpoint event.
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;
}