Compartir a través de


IDebugBreakpointResolution2::GetBreakpointType

Gets the type of the breakpoint represented by this resolution.

HRESULT GetBreakpointType( 
   BP_TYPE* pBPType
);
int GetBreakpointType( 
   out enum_ BP_TYPE pBPType
);

Parameters

  • pBPType
    [out] Returns a value from the BP_TYPE enumeration that specifies the type of this breakpoint.

Return Value

If successful, returns S_OK; otherwise returns an error code. Returns E_FAIL if the bpResLocation field in the associated BP_RESOLUTION_INFO structure is not valid.

Remarks

The breakpoint may be a code or a data breakpoint, for example.

Example

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

HRESULT CDebugBreakpointResolution::GetBreakpointType(BP_TYPE* pBPType)  
{  
   HRESULT hr;  
  
   if (pBPType)  
   {  
      // Set default BP_TYPE.  
      *pBPType = BPT_NONE;  
  
      // Check if the BPRESI_BPRESLOCATION flag is set in BPRESI_FIELDS.  
      if (IsFlagSet(m_bpResolutionInfo.dwFields, BPRESI_BPRESLOCATION))  
      {  
         // Set the new BP_TYPE.  
         *pBPType = m_bpResolutionInfo.bpResLocation.bpType;  
         hr = S_OK;  
      }  
      else  
      {  
         hr = E_FAIL;  
      }  
   }  
   else  
   {  
      hr = E_INVALIDARG;  
   }  
  
   return hr;  
}  

See Also

Reference

IDebugBreakpointResolution2

BP_TYPE

BPRESI_FIELDS

BP_RESOLUTION_LOCATION

BP_RESOLUTION_INFO