共用方式為


IDebugBreakpointUnboundEvent2::GetReason

取得中斷點是未繫結的原因。

HRESULT GetReason( 
   BP_UNBOUND_REASON* pdwUnboundReason
);
int GetReason( 
   out enum_ BP_UNBOUND_REASON pdwUnboundReason
);

參數

  • pdwUnboundReason
    [] out傳回值,從BP_UNBOUND_REASON列舉型別指定中斷點是未繫結的原因。

傳回值

如果成功的話,會傳回S_OK。 否則,會傳回錯誤碼。

備註

原因包括正在不同的位置編輯後繼續作業或判斷,中斷點已繫結錯誤後重新繫結中斷點。

範例

下列範例會示範如何實作這個方法,如 CBreakpointUnboundDebugEventBase 物件,公開 (expose) IDebugBreakpointUnboundEvent2介面。

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 );
}

請參閱

參考

IDebugBreakpointUnboundEvent2