다음을 통해 공유


IDebugBreakpointUnboundEvent2::GetReason

중단점이 바인딩되지 않은 이유를 가져옵니다.

구문

int GetReason(
    out enum_ BP_UNBOUND_REASON pdwUnboundReason
);

매개 변수

pdwUnboundReason
[out] 중단점이 바인딩되지 않은 이유를 지정하는 BP_UNBOUND_REASON 열거형의 값을 반환합니다.

Return Value

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

설명

이유로는 편집 및 계속 작업 후 중단점이 다른 위치로 다시 바인딩되는 경우나 중단점이 오류로 바인딩된 경우 등이 있습니다.

예시

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

STDMETHODIMP CBreakpointUnboundDebugEventBase::GetReason(
    BP_UNBOUND_REASON* pdwUnboundReason)
{
    HRESULT hRes = E_FAIL;

    if ( EVAL(pdwUnboundReason) )
    {
        *pdwUnboundReason = m_dwReason;

        hRes = S_OK;
    }
    else
        hRes = E_INVALIDARG;

    return ( hRes );
}

참고 항목