Skip to content

Latest commit

 

History

History
84 lines (72 loc) · 2.08 KB

idebugerrorbreakpointresolution2-getbreakpointtype.md

File metadata and controls

84 lines (72 loc) · 2.08 KB
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
IDebugErrorBreakpointResolution2::GetBreakpointType
IDebugErrorBreakpointResolution2::GetBreakpointType
maiak
maiak
mijacobs
debug-diagnostics
CPP
CSharp

IDebugErrorBreakpointResolution2::GetBreakpointType

Gets the breakpoint type.

Syntax

int GetBreakpointType(
    out enum_BP_TYPE pBPType
);
HRESULT GetBreakpointType(
    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;
}

See also