Compartir a través de


IDebugBoundBreakpoint2::GetBreakpointResolution

Gets the breakpoint resolution that describes this breakpoint.

HRESULT GetBreakpointResolution( 
   IDebugBreakpointResolution2** ppBPResolution
);
int GetBreakpointResolution( 
   out IDebugBreakpointResolution2 ppBPResolution
);

Parameters

  • ppBPResolution
    [out] Returns the IDebugBreakpointResolution2 interface that represents one of the following:

    • The breakpoint resolution object that describes the location in code where a code breakpoint has been bound.

    • The data location where a data breakpoint has bound.

Return Value

If successful, returns S_OK; otherwise, returns an error code. Returns E_BP_DELETED if the state of the bound breakpoint object is set to BPS_DELETED (part of the BP_STATE enumeration).

Remarks

Call the IDebugBreakpointResolution2::GetBreakpointType method to determine if the breakpoint resolution is for code or data.

Example

The following example shows how to implement this method for a simple CBoundBreakpoint object that exposes the IDebugBoundBreakpoint2 interface.

HRESULT CBoundBreakpoint::GetBreakpointResolution(
    IDebugBreakpointResolution2** ppBPResolution)
{  
   HRESULT hr;  
  
   if (ppBPResolution)  
   {  
      // Verify that the bound breakpoint has not been deleted. If 
      // deleted, then return hr = E_BP_DELETED.  
      if (m_state != BPS_DELETED)  
      {  
         // Query for the IDebugBreakpointResolution2 interface.  
         hr = m_pBPRes->QueryInterface(IID_IDebugBreakpointResolution2,
                                       (void **)ppBPResolution);
         assert(hr == S_OK);  
      }  
      else  
      {  
         hr = E_BP_DELETED;  
      }  
   }  
   else  
   {  
      hr = E_INVALIDARG;  
   }  
  
   return hr;  
}  

See Also

Reference

IDebugBoundBreakpoint2

IDebugBreakpointResolution2

IDebugBreakpointResolution2::GetBreakpointType