IDebugBreakpointBoundEvent2::GetPendingBreakpoint

取得正在系結的暫止斷點。

語法

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

參數

ppPendingBP
[out]會傳 回代表所系結之暫止斷點的 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 );
}

另請參閱