Export (0) Print
Expand All

IDebugBreakpointRequest2::GetLocationType 

Gets the breakpoint location type of this breakpoint request.


int GetLocationType( 
   out uint pBPLocationType
);

Parameters

pBPLocationType

[out] Returns a value from the BP_LOCATION_TYPE enumeration that describes the location of this breakpoint request.

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

The following example shows how to implement this method for a simple CDebugBreakpointRequest object that exposes theIDebugBreakpointRequest2 interface.

HRESULT CDebugBreakpointRequest::GetLocationType(BP_LOCATION_TYPE* pBPLocationType)  
{  
   HRESULT hr;  
  
   if (pBPLocationType)  
   {  
      // Set default BP_LOCATION_TYPE.  
      *pBPLocationType = BPLT_NONE;  
  
      // Check if the BPREQI_BPLOCATION flag is set in BPREQI_FIELDS.  
      if (IsFlagSet(m_bpRequestInfo.dwFields, BPREQI_BPLOCATION))  
      {  
         // Get the new BP_LOCATION_TYPE.  
         *pBPLocationType = m_bpRequestInfo.bpLocation.bpLocationType;  
         hr = S_OK;  
      }  
      else  
      {  
         hr = E_FAIL;  
      }  
   }  
   else  
   {  
      hr = E_INVALIDARG;  
   }  
  
   return hr;  
}  

Community Additions

ADD
Show:
© 2014 Microsoft