IDebugPendingBreakpoint2::DeleteIDebugPendingBreakpoint2::Delete

Supprime ce point d’arrêt en attente et tous les points d’arrêt liés à partir de celui-ci.Deletes this pending breakpoint and all breakpoints bound from it.

SyntaxeSyntax

HRESULT Delete(   
   void   
);  
int Delete();  

Valeur de retourReturn Value

En cas de réussite, retourne S_OK; sinon, retourne un code d’erreur.If successful, returns S_OK; otherwise, returns an error code. Retourne E_BP_DELETED si le point d’arrêt a été supprimé.Returns E_BP_DELETED if the breakpoint has been deleted.

ExempleExample

L’exemple suivant montre comment implémenter cette méthode pour une simple CPendingBreakpoint objet qui implémente le IDebugPendingBreakpoint2 interface.The following example shows how to implement this method for a simple CPendingBreakpoint object that implements the IDebugPendingBreakpoint2 interface.

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

   // Verify that the pending breakpoint has not been deleted. If deleted,    
   // then return hr = E_BP_DELETED.    
   if (m_state.state != PBPS_DELETED)    
   {    
      // If the pending breakpoint has bound and has an associated bound   
      // breakpoint, delete and release the bound breakpoint and set the   
      // pointer to NULL.    
      if (m_pBoundBP)    
      {    
         m_pBoundBP->Delete();    
         m_pBoundBP->Release();    
         m_pBoundBP = NULL;    
      }    
      // If the pending breakpoint did not bind and has an associated   
      // error breakpoint, release the error breakpoint and set the   
      // pointer to NULL.   
      if (m_pErrorBP)    
      {    
         m_pErrorBP->Release();    
         m_pErrorBP = NULL;    
      }    

      // Set the PENDING_BP_STATE in the PENDING_BP_STATE_INFO structure   
      // to deleted.     
      m_state.state = PBPS_DELETED;    
   }    
   else    
   {    
      hr = E_BP_DELETED;    
   }    

   return hr;    
}    

Voir aussiSee Also

IDebugPendingBreakpoint2IDebugPendingBreakpoint2