다음을 통해 공유


IDebugBreakpointErrorEvent2::GetErrorBreakpoint

중단점이 바인딩되지 않은 이유를 설명하는 IDebugErrorBreakpoint2 개체를 가져옵니다.

구문

int GetErrorBreakpoint( 
    out IDebugErrorBreakpoint2 ppErrorBP
);

매개 변수

ppErrorBP
[out] 경고 또는 오류를 설명하는 IDebugErrorBreakpoint2 개체를 반환합니다.

Return Value

성공하면 S_OK를 반환하고, 실패하면 오류 코드를 반환합니다.

설명

IDebugErrorBreakpoint2 인터페이스를 가져온 후 GetBreakpointResolution 메서드를 호출하여 IDebugErrorBreakpointResolution2 개체를 가져옵니다. 그런 다음, GetResolutionInfo 메서드를 사용하여 잘못된 위치, 잘못된 식 또는 보류 중인 중단점이 바인딩되지 않은 이유(예: 아직 로드되지 않은 코드 등)를 확인할 수 있습니다.

예시

다음 예제에서는 IDebugBreakpointErrorEvent2 인터페이스를 노출하는 CBreakpointSetDebugEventBase 개체에 대해 이 메서드를 구현하는 방법을 보여 줍니다.

STDMETHODIMP CBreakpointErrorDebugEventBase::GetErrorBreakpoint(
    IDebugErrorBreakpoint2 **ppbp)
{
    HRESULT hRes = E_FAIL;

    if ( ppbp )
    {
        if ( m_pError )
        {
            *ppbp = m_pError;

            m_pError->AddRef();

            hRes = S_OK;
        }
        else
            hRes = E_FAIL;
    }
    else
        hRes = E_INVALIDARG;

    return ( hRes );
}

참고 항목