Aracılığıyla paylaş


IDebugBoundBreakpoint2::Delete

Kesme noktasını siler.

Sözdizimi

int Delete();

İade Değeri

Başarılı olursa döndürür S_OK; aksi takdirde bir hata kodu döndürür. İlişkili kesme noktası nesnesinin durumu (BP_STATE numaralandırmasının bir parçası) olarak ayarlanırsa BPS_DELETED döndürürE_BP_DELETED.

Örnek

Aşağıdaki örnek, IDebugBoundBreakpoint2 arabirimini kullanıma sunan basit CBoundBreakpoint bir nesne için bu yöntemin nasıl uygulandığını gösterir.

HRESULT CBoundBreakpoint::Delete(void)
{
    HRESULT hr;

    // Verify that the bound breakpoint has not been
    // deleted. If deleted, then return hr = E_BP_DELETED.
    if (m_state != BPS_DELETED)
    {
        m_pInterp->RemoveBreakpoint(m_sbstrDoc, this);

        // Change the state of the breakpoint to BPS_DELETED.
        m_state = BPS_DELETED;
        hr = S_OK;
    }
    else
    {
        hr = E_BP_DELETED;
    }

    return hr;
}

Ayrıca bkz.