IDebugBoundBreakpoint2::Delete
Odstraní zarážku.
Syntaxe
Vrácená hodnota
V případě úspěchu vrátí hodnotu S_OK
; v opačném případě vrátí kód chyby. Vrátí E_BP_DELETED
, pokud je stav vázaného objektu zarážky nastaven na BPS_DELETED
(část BP_STATE výčtu).
Příklad
Následující příklad ukazuje, jak implementovat tuto metodu pro jednoduchý CBoundBreakpoint
objekt, který zveřejňuje IDebugBoundBreakpoint2 rozhraní.
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;
}