IDebugBoundBreakpoint2::Delete
刪除中斷點。
HRESULT Delete(
void
);
int Delete();
傳回值
如果成功的話,會傳回S_OK。 否則,會傳回錯誤碼。 傳回E_BP_DELETED如果繫結的中斷點物件的狀態會設定為BPS_DELETED (屬於BP_STATE列舉型別)。
範例
下列範例會示範如何實作這個方法,如CBoundBreakpoint物件,公開 (expose) IDebugBoundBreakpoint2介面。
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;
}