IDebugBoundBreakpoint2::Delete
중단점을 삭제합니다.
구문
Return Value
성공하면 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;
}