다음을 통해 공유


IDebugBoundBreakpoint2::GetBreakpointResolution

이 중단점을 설명하는 중단점 확인을 가져옵니다.

구문

int GetBreakpointResolution( 
    out IDebugBreakpointResolution2 ppBPResolution
);

매개 변수

ppBPResolution
[out] 다음 중 하나를 나타내는 IDebugBreakpointResolution2 인터페이스를 반환합니다.

  • 코드 중단점이 바인딩된 코드의 위치를 설명하는 중단점 확인 개체입니다.

  • 데이터 중단점이 바인딩된 데이터 위치입니다.

Return Value

성공하면 S_OK를 반환하고, 실패하면 오류 코드를 반환합니다. 바인딩된 중단점 개체의 상태가 BPS_DELETED(BP_STATE 열거형의 일부)로 설정되어 있으면 E_BP_DELETED를 반환합니다.

설명

GetBreakpointType 메서드를 호출하여 중단점 확인이 코드 또는 데이터에 대한 것인지 확인합니다.

예시

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

HRESULT CBoundBreakpoint::GetBreakpointResolution(
    IDebugBreakpointResolution2** ppBPResolution)
{
    HRESULT hr;

    if (ppBPResolution)
    {
        // Verify that the bound breakpoint has not been deleted. If
        // deleted, then return hr = E_BP_DELETED.
        if (m_state != BPS_DELETED)
        {
            // Query for the IDebugBreakpointResolution2 interface.
            hr = m_pBPRes->QueryInterface(IID_IDebugBreakpointResolution2,
                                          (void **)ppBPResolution);
            assert(hr == S_OK);
        }
        else
        {
            hr = E_BP_DELETED;
        }
    }
    else
    {
        hr = E_INVALIDARG;
    }

    return hr;
}

참고 항목