ブレークポイントを削除します。
構文
戻り値
成功した場合は、S_OK
を返します。それ以外の場合は、エラー コードを返します。 バインドされたブレークポイント オブジェクトの状態が BPS_DELETED
(BP_STATE 列挙の一部) に設定されている場合は、E_BP_DELETED
を返します。
例
次の例は、IDebugBoundBreakpoint2 インターフェイスを公開するシンプルな CBoundBreakpoint
オブジェクトにこのメソッドを実装する方法を示しています。
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;
}