次の方法で共有


IDebugBreakpointBoundEvent2::GetPendingBreakpoint

バインドされている保留中のブレークポイントを取得します。

構文

HRESULT GetPendingBreakpoint(
    IDebugPendingBreakpoint2** ppPendingBP
);
int GetPendingBreakpoint(
    out IDebugPendingBreakpoint2 ppPendingBP
);

パラメーター

ppPendingBP
[出力] バインドされている保留中のブレークポイントを表す IDebugPendingBreakpoint2 オブジェクトを返します。

戻り値

成功した場合は、S_OK を返します。それ以外の場合は、エラー コードを返します。

次の例は、IDebugBreakpointBoundEvent2 インターフェイスを公開する CBreakpointSetDebugEventBase オブジェクトに対してこのメソッドを実装する方法を示しています。

STDMETHODIMP CBreakpointSetDebugEventBase::GetPendingBreakpoint(
    IDebugPendingBreakpoint2 **ppPendingBP)
{
    HRESULT hRes = E_FAIL;

    if ( ppPendingBP )
    {
        if ( m_pPendingBP )
        {
            *ppPendingBP = m_pPendingBP;

            m_pPendingBP->AddRef();

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

    return ( hRes );
}

関連項目